On 11/19/2011 06:23 AM, Gregory Maxwell wrote:
On Fri, Nov 18, 2011 at 11:27 PM, Ralf Corsepiusrc040203@freenet.de wrote:
[1] -Wstrict-aliasing is one of these cases. The spots such warnings point to, often are broken, but not always, because GCC has difficulties in identifying these.
This use to be more true, but there are multiple levels of -Wstrict-aliasing
I know.
and I would be _highly_ surprised if the default gave a false alarm.
At least older gccs (IIRC, gcc-4.4.x) did fairly often. gcc-4.6.x is less agressively warning.
If GCC is sure something is wrong, it is supposed to raise errors.
This isn't true. E.g. you can write code which reads and uses uninitialized memory where the compiler is _absolutely sure_ of it. You still just get a warning.
Well, ... this would qualify as a bug in GCC, IMHO.
Ralf