This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c/10411: Why is __STDC_VERSION__ not defined? (gcc 2.96 & 3.1)


grant dot jacobs at clear dot net dot nz wrote:-

> Why is __STDC_VERSION__ not defined? I've tried this in gcc 2.96 & 3.1:
> 
> 
> #include <stdio.h>
> 
> #if defined __STDC_VERSION__
>   #define avail "yes!"
> #else
>   #define avail "nope"
> #endif
> 
> int main()
> {
>   printf( "__STDC__ == '%d'\n", __STDC__ ) ;
>   printf( "Is __STDC_VERSION__ defined: %s\n", avail ) ;
> }
> 
> 
> and it results in:
> 
> 
> __STDC__ == '1'
> Is __STDC_VERSION__ defined: nope

You're compiling in C89 mode I imagine.

Neil.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]