------- Comment #4 from jonny+bg at mail dot hfa3 dot org 2010-05-31 23:46 ------- Same as comment 3, hopefully in pre tags this time.
For clarity, a smaller test is: __inline __attribute__ ((gnu_inline)) void func () { } int main() { func(); return 0; } $ g++ foo.cpp /tmp/cc31L8fw.o: In function `main': foo.cpp:(.text+0x5): undefined reference to `func()' collect2: ld returned 1 exit status Most people who hit this bug are likely using gperf. $ gperf -N func . . . #ifdef __GNUC__ __inline #if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ __attribute__ ((__gnu_inline__)) #endif #endif const char * func (str, len) . . . $ gperf -N func -L C++ # will and avoid this bug :-) but also renames func to Perfect_Hash::func :-( -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41194