GCC

共 21 篇文章。

C++ 中的 main 定义

• Development

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

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

阅读全文… ( 本文约 395 字,阅读大致需要 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.

阅读全文… ( 本文约 315 字,阅读大致需要 2 分钟 )

enigmail-thunderbird与gcc 4.2

• Development

前一阵子一直无法在 FreeBSD/amd64 上面利用 engimail-thunderbird 来进行 PGP 签名。简单说来,一开始是注册控件的时候 signal 11,留下怪怪的backtrace,到后来索性没反应了。

发信到 engimail 的邮件列表,结果他们也觉得很奇怪。

阅读全文… ( 本文约 123 字,阅读大致需要 1 分钟 )

gcc 4.2.1 imported

• Development

Alexander Kabaev大长辈今天终于完成了gcc 4.2.1的import,这样,RELENG_7所需的准备工作基本上全面结束。我希望能够在7.0-RELEASE之前把已知的tmpfs问题全部修掉。

参与评论

函数指针

• Development

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

typedef void (*func_ptr)();

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

阅读全文… ( 本文约 158 字,阅读大致需要 1 分钟 )

gcc 3.4.4 imported into FreeBSD base

• Development
kan         2005-06-03 03:29:21 UTC

  FreeBSD src repository

  src/contrib/gcc - Imported sources
  Update of /home/ncvs/src/contrib/gcc
  In directory repoman.freebsd.org:/tmp/cvs-serv9201

  Log Message:
  Gcc 3.4.4 release.

  Status:

  Vendor Tag:	FSF
  Release Tags:	gcc_3_4_4_20050518
参与评论

About strict-aliasing optimization

• Development

What is strict aliasing? To make the long thing short, it means that the compiler apply strictest aliasing rules applicable to the language and having these assumptions the optimizer can do further optimizations.

To quote gcc manual:

阅读全文… ( 本文约 119 字,阅读大致需要 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.

阅读全文… ( 本文约 79 字,阅读大致需要 1 分钟 )