Spiro Trikaliotis wrote:
Quote:
>
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?
For char arrays, initialized with fixed strings. Not here.
--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
<http://kadaitcha.cx/vista/dogsbreakfast/index.html>
cbfalconer at maineline dot net
--
Posted via a free Usenet account from
http://www.teranews.com