[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: |
Dave Hylands |
Subject: |
Re: [avr-gcc-list] zero length array in nocommon |
Date: |
Wed, 23 Sep 2009 14:20:01 -0700 |
> This 'quirk' of gcc does not seem to be specifically avr related
> but probably we are the only one's left to care about the
> spoilled byte.
I seem to recall something (not sure if it's a language requirement or
not) about stuff needing to allocate at least one byte. This ensures
that when you take the address of one object it doesn't equal the
address of another object (which could happen if the object in fact
takes up zero bytes).
I also seem to recall that in C++ the new operator needs to allocate 1
byte, even when passed a length of zero to allocate.
--
Dave Hylands
Shuswap, BC, Canada
http://www.DaveHylands.com/
- [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 <=
- Re: [avr-gcc-list] zero length array in nocommon, bleverett, 2009/09/23
- RE: [avr-gcc-list] zero length array in nocommon, Weddington, Eric, 2009/09/23
- 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