Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 16 Jan 2013 08:46:06 +0100
From: Igmar Palsenberg <igmar@...senberg.com>
To: musl@...ts.openwall.com
Subject: Re: malloc(0) behaviour



>>> This is a constraint violation. C does not allow empty structs, and
>>> even if it did, they would not have size 0, since no type or object
>>> ever has size 0 in C.
>> 
>> GCC thinks otherwise
> 
> Therein lies the problem.
> It's an extension, as are a multitude of other things such as ?:
> expressions missing the middle expression and ({...}) and so on. Clang
> also implements these, as do other compilers such as tcc.

True. I just wanted to indicate that because it compiles, it ends up being used, and considered "standard code". Unportable in theory,
but this kind of extensions enabled by default causes this. The same goes for zero-length arrays if I remember correctly.

I still need to lookup how to disable those.



	Igmar

Powered by blists - more mailing lists

Your e-mail address:

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.