[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [avr-gcc-list] zero length array in nocommon
From: |
Weddington, Eric |
Subject: |
RE: [avr-gcc-list] zero length array in nocommon |
Date: |
Wed, 23 Sep 2009 20:14:33 -0600 |
> -----Original Message-----
> From:
> address@hidden
> [mailto:address@hidden
> org] On Behalf Of address@hidden
> Sent: Wednesday, September 23, 2009 6:05 PM
> To: Ruud Vlaming
> Cc: address@hidden
> 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] zero length array in nocommon, Ruud Vlaming, 2009/09/23
- Re: [avr-gcc-list] zero length array in nocommon, Joerg Wunsch, 2009/09/23
- Re: [avr-gcc-list] zero length array in nocommon, Ruud Vlaming, 2009/09/23
- Re: [avr-gcc-list] zero length array in nocommon, Dave Hylands, 2009/09/23
- Re: [avr-gcc-list] zero length array in nocommon, bleverett, 2009/09/23
- RE: [avr-gcc-list] zero length array in nocommon,
Weddington, Eric <=
- Re: [avr-gcc-list] zero length array in nocommon, Ruud Vlaming, 2009/09/24
- RE: [avr-gcc-list] zero length array in nocommon, Weddington, Eric, 2009/09/24
- Re: [avr-gcc-list] zero length array in nocommon, Joerg Wunsch, 2009/09/24
- Re: [avr-gcc-list] zero length array in nocommon, Ruud Vlaming, 2009/09/24
- [avr-gcc-list] Re: zero length array in nocommon, David Brown, 2009/09/24
- Re: [avr-gcc-list] Re: zero length array in nocommon, Ruud Vlaming, 2009/09/24
- [avr-gcc-list] Re: zero length array in nocommon, David Brown, 2009/09/24
- RE: [avr-gcc-list] Re: zero length array in nocommon, Weddington, Eric, 2009/09/24
- [avr-gcc-list] Re: zero length array in nocommon, David Brown, 2009/09/24
- RE: [avr-gcc-list] Re: zero length array in nocommon, Weddington, Eric, 2009/09/24