S
Spiro Trikaliotis
Hello,
in a project, I stumbled upon code like follows (incomplete):
#if defined(MINIXVMD) || defined(MINIX_SUPPORT) || defined(__VBCC__) || (defined(__BEOS__) && defined(WORDS_BIGENDIAN)) || define
d(WATCOM_COMPILE)
void *array[3];
array[0]=&asm6502;
array[1]=&asmz80;
array[2]=NULL;
#else
void *array[3] = { &asm6502, &asmz80, NULL };
#endif
I was very surprised to read this. I always thought the array
initialization (the #else case) was standard since C90. Am I wrong here,
or are the compilers used non-conformant?
Regards,
Spiro.
in a project, I stumbled upon code like follows (incomplete):
#if defined(MINIXVMD) || defined(MINIX_SUPPORT) || defined(__VBCC__) || (defined(__BEOS__) && defined(WORDS_BIGENDIAN)) || define
d(WATCOM_COMPILE)
void *array[3];
array[0]=&asm6502;
array[1]=&asmz80;
array[2]=NULL;
#else
void *array[3] = { &asm6502, &asmz80, NULL };
#endif
I was very surprised to read this. I always thought the array
initialization (the #else case) was standard since C90. Am I wrong here,
or are the compilers used non-conformant?
Regards,
Spiro.