> -----Original Message-----
> From: 
> avr-gcc-list-bounces+eric.weddington=atmel....@nongnu.org 
> [mailto:avr-gcc-list-bounces+eric.weddington=atmel....@nongnu.
> org] On Behalf Of blever...@att.net
> Sent: Wednesday, September 23, 2009 6:05 PM
> To: Ruud Vlaming
> Cc: avr-gcc-list@nongnu.org
> Subject: Re: [avr-gcc-list] zero length array in nocommon
> 
> I used this for the exact same reason.  I really don't like 
> seeing a lot of #if's in the code, and the zero-length array 
> solved this problem beautifully.
> 
> That is, until I had to port the code to IAR.  That compiler 
> does not honor zero-length arrays, so I had to add some 
> #if's.  I came up with some macros that were helpful, but 
> they made the code much harder to understand.  So we're back 
> to lots of #if's in the code.

So it may be easier, but it's not standard C. This sounds a lot like the 
CodeVision compiler's way of setting a bit on a port: completely non-standard.

Best to stick with what is portable and just learn to read code with #ifdefs. A 
bit of indentation usually helps. ;-)


_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to