On 15.04.2017 19:15, Victor Aprea wrote:
Hey all,
I'm working on porting a library and I've run across an unfortunate
surprise (or I'm just doing it wrong).
Can someone confirm that avr-gcc 4.8.1 doesn't (implicitly)
define __STDC_VERSION__ as suggested by
https://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html#Standard-Predefined-Macros?
It works for me, e.g.:
$ echo | avr-gcc-4.8 -std=iso9899:199409 -xc - -E -dM | grep STDC_V
#define __STDC_VERSION__ 199409L
$ echo | avr-gcc-4.8 -std=iso9899:1999 -xc - -E -dM | grep STDC_V
#define __STDC_VERSION__ 199901L
etc.
$ avr-gcc-4.8 -v
...
Target: avr
Configured with: ../../gcc.gnu.org/gcc-4_8-branch/configure --target=avr
--prefix=/local/gnu/install/gcc-4.8 --disable-nls --with-dwarf2
--enable-target-optspace=yes --with-gnu-ld --with-gnu-as
--enable-languages=c,c++
Thread model: single
gcc version 4.8.5 20150220 (prerelease) (GCC)
Johann
If not, how is a library to determine if the compiler is C89 or C99 or
whatever?
Kind Regards,
Vic
_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list