__STDC_VERSION__ missing?

I tried using the STDC_VERSION macro to test the ISO C version, but pgcc doesn’t support this? gcc 4 supports this when using -std=c99

test.c:

#include <stdlib.h>
#include <stdio.h>

int main(void)
{
printf(“%ld”,STDC_VERSION);
}


$ pgcc -c9x test.c
PGC-S-0039-Use of undeclared variable _STDC_VERSION (test.c: 6)

I forgot to mention the version:

pgcc 6.1-1 64-bit target on x86-64 Linux

Hi Christopher,

Thank you for pointing this out. While we have a few C99 features that have yet to be added, I think this was an oversite. I have added a technical problem report (TPR#3805) and we should be able to correct this in the near future.

  • Mat