I was wondering now that atleast in 3.3.X series the __STDC_VERSION__ is no longer defined by default, how should portable code determine which vararg macro format can be used? (or is the -std=c99 or similar intended as mandatory for c99 vararg macros)
I read somewhere that the __STDC_VERSION__ wouldn't be defined for c++ alone, but that's not the case either. Moreover with c++ the gcc seems to define the __cplusplus into 1 rather than year-month combo.
I mean checks like below no longer yield results they used to.
#if (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) #define mydebug(format, ...) printf(format , ## __VA_ARGS__) #else #define mydebug(format...) printf(format) #endif
I'm face to face with gcc versions 2.95.3, 3.0.X and above and I'm unable to find any reference as to how should I check the vararg macro support, because each and every web page still suggests that check. How should it be checked these days?
Please also cc me replies as I'm not on the list.
cheers, Tommi "Kynde" Kyntola kynde@xxxxxxxxx