GCC

共21篇文章。

C++中的main定义

Development

新的C++标准中不允许给main指定linkage-specification了。

当然,考虑到原本main()也是C运行环境在开始运行程序的时候调用的,而C运行环境自然也预期C linkage,即不按照C++的习惯对符号根据参数增加名字前缀,因此大部分编译器在遇到C++程序定义全局main()的时候也会按照习惯采取C linkage方式去翻译。这一规则首先被GCC采纳,随后LLVM也跟进了。

阅读全文…:C++中的main定义(本文约455字,阅读大致需要1分钟)

Progress on LLVM clang

Development

As some of you already know, FreeBSD, along with some other Open Source projects, is moving away from GCC due to GPLv3. From a technology perspective, this also makes sense since the (likely) candidate, BSD-style licensed, LLVM based clang, a C compiler, is making reasonably good progress.

So, what should we expect from LLVM or clang?

Here is a good comparison between GCC and clang. Despite GCC is popular, considerably more mature,and supports more languages (especially C++, which clang’s support is incomplete at this moment), clang provides cleaner AST (Abstract Syntax Tree), much more modularized (if you take a look at GCC’s history,Richard Stallman intentionally made GCC’s code not reusable in other software), provided much more information for optimizer, is much faster and use much less memory, etc.

For FreeBSD, currently, clang can compile its kernel with only very few tweaks.

阅读全文…:Progress on LLVM clang(本文约307字,阅读大致需要2分钟)

函数指针

Development

今天在改rtld-elf的时候发现,它定义了一个函数指针数组,其内容是参数不定的,于是定义为:

typedef void (*func_ptr)();

然而,在较高的警告级别下,这一写法会被gcc认为不是prototype。

阅读全文…:函数指针(本文约188字,阅读大致需要1分钟)

delphijfork 20040801 is available now

Development

This is basically equivlent as what is running on beastie.frontfree.net. It exhibits stablity and performance improvements the recent work by FreeBSD folks.

Main new features (all from FreeBSD):

  • gcc 3.4.2
  • ACPI, drivers’ improvements
  • VM improvements

etc.

Yeah I know that you were surprised why there were not delphijfork during the last two weeks, that is because I was extremely busy and beasite got some problems. Now everything seems to be sane.

阅读全文…:delphijfork 20040801 is available now(本文约79字,阅读大致需要1分钟)
搜索文章…(按ESC退出)