[pacman-dev] gnu89-inline
Xavier Chantry
chantry.xavier at gmail.com
Sat Apr 2 13:17:50 EDT 2011
I am just curious, what do we need this flag for ?
I only found this :
http://gcc.gnu.org/onlinedocs/gcc/Inline.html
GCC implements three different semantics of declaring a function
inline. One is available with -std=gnu89 or -fgnu89-inline or when
gnu_inline attribute is present on all inline declarations, another
when -std=c99, -std=c1x, -std=gnu99 or -std=gnu1x (without
-fgnu89-inline), and the third is used when compiling C++.
There is a small annoyance with clang, the configure check believes
fgnu89-inline is supported because clang only emits a warning when
that flag is specified :
checking for -fgnu89-inline... yes
So every libalpm file triggers this warning when building :
clang: warning: argument unused during compilation: '-fgnu89-inline'
Anyway it looks like we could use -std=gnu89 alternatively ?
... which brings to another topic that was brought recently on the ML
: I tried to build with that and got a lot of warnings :)
../../lib/libalpm/alpm.h:396:29: warning: commas at the end of
enumerator lists are a C99-specific feature [-pedantic]
pacman.c:1201:8: warning: ISO C90 forbids mixing declarations and code
[-Wdeclaration-after-statement]
util.c:797:8: warning: variable declaration in for loop is a
C99-specific feature [-pedantic]
...
More information about the pacman-dev
mailing list