Matthias Klose wrote: > gnu99 is "ISO C99 plus GNU extensions"; please see > http://gcc.gnu.org/onlinedocs/gcc-4.2.2/gcc/Inline.html: "If you are > writing a header file to be included in ISO C programs, write __inline__ > instead of inline."
I'm curious. Did you read my big report? If you read it and that was your response, I really don't think you understood it. From: > https://bugs.launchpad.net/bugs/159923 #> I am compiling code with "gcc -std=gnu99". According to the gcc #> man page, gnu99 means the C99 standard with GNU (ie POSIX) extensions. #> #> However, compiling something like: #> #> inline int plus_2 (int x) { return x + 2 ; } #> #> results in the warning: #> #> warning: C99 inline functions are not supported; using GNU89 #> #> I am not using gnu89, I'm using gnu99. This worked for gcc-4.1 and earlier. If I include include "-std=gnu99" and mention the man page which states: gnu99 : ISO C99 plus GNU extensions. I read that as meaning that gnu99 is a superset of C99 and hence there should be no warning whatsoever for valid uses of the "inline" keyword. Instead I get: warning: C99 inline functions are not supported; using GNU89 If gnu99 is a superset of C99 and C99 specifcally supports "inline", why am I getting that warning for this program: inline int plus_2 (int x) { return x + 2 ; } int main (void) { return plus_2 (0) ; } Note, there is no header file involved, just a single C implementation file, a single standalone program. Erik -- ----------------------------------------------------------------- Erik de Castro Lopo ----------------------------------------------------------------- "If you think C++ is not overly complicated, just what is a protected abstract virtual base pure virtual private destructor and when was the last time you needed one?" -- Tom Cargill -- gcc-4.2 : regression for -std=gnu99 https://bugs.launchpad.net/bugs/159923 You received this bug notification because you are a member of Ubuntu Bugs, which is the bug contact for Ubuntu. -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
