Kenneth Brody wrote:
> Eric Sosman wrote:
>> Kenneth Brody wrote:
>>> Eric Sosman wrote:
>>>> `#if __STDC_VERSION__ >= 199901L' means "C99 or later"
>>> However, what happens when __STDC_VERSION__ isn't defined at all?
>>> (I suppose this obviously means "not C99".) Neither "cc" under
>>> SCO Unix, nor MSVC 6.0 define this. (I haven't tried any other
>>> platforms yet.)
>> An identifier that isn't defined as a macro evaluates
>> as zero for the purposes of #if. 6.10.1/2:
> Well, that helps for "#if __STDC_VERSION__ >= 199901L", but it
> doesn't help my test of printf("%ld\n",__STDC_VERSION__);.
>>> That's 2 underscores, "STDC", one underscore, "VERSION", two
>>> underscores. Correct?
>> Correct. See 6.10.8/1.
> Thanks. I just wanted to make sure I didn't have a typo.
You need these gyrations to investigate, since __STDC_VERSION__ is
not mentioned in C89: