[asterisk-dev] gcc bug with zero-sized arrays and struct initializers.

Luigi Rizzo rizzo at icir.org
Tue Oct 30 09:02:30 CDT 2007


On Tue, Oct 30, 2007 at 08:42:45AM -0500, Kevin P. Fleming wrote:
> Luigi Rizzo wrote:
> 
> > On the other hand, you wouldn't expect the compiler to fail so badly.
> 
> I really do not understand this comment at all. First, all software has
> bugs, compilers included. The maintainers of those packages then fix the
> bugs and make new releases.
> 
> GCC 2.95.3 was released over six years ago. Every version of GCC 3.x and
> 4.x is able to handle this construct, and they should be, since it is
> completely valid C.
> 
> If you want to come up with macros that can be used in exactly the same
> way that the current ones are, don't require any additional storage and
> aren't more difficult to maintain, then feel free to contribute them.

that's my plan, yes - you know i usally do contribute code :)

I am not asking for others to fix anything or do work for me;
I am just pointing out a subtle compiler bug in handling a not-so-common
construct, so next time someone is hit by a similar bug (in some
other compiler, e.g. maybe trying to port asterisk to some other
platform) there is at least a trace on the archives.

cheers
luigi



More information about the asterisk-dev mailing list