On Wed, Nov 12, 2014 at 04:34:05PM +0000, Jonathan Wakely wrote: > On 12 November 2014 13:41, Dominik Vogt wrote: > > However, this does not work with a plain gcc call, i.e. gcc does > > not define __STDC_VERSION__ (or __STDC__) if not told explicitly > > which standard to use, e.g. with --std=c99. > > That's not quite accurate - you can tell gcc to explicitly use > -std=c90 and it doesn't define it, or you can use current trunk with > no -std option and it defines it (because trunk defaults to C11). > > GCC does not define __STDC_VERSION__ unless compiling C99 or later, > because (I believe) that's when the macro was first defined. > > So it's nothing to do with an explicit -std option, it's to do with > the language version being used, implicitly or explicitly. Checking macros for all kinds of compilers seemed to burdensome, so I'll use an AC_TRY_COMPILE configure check instead. Thanks for the information. Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany