Re: Package segfaults when built with -O2 but not with -O0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/19/2011 06:23 AM, Gregory Maxwell wrote:
> On Fri, Nov 18, 2011 at 11:27 PM, Ralf Corsepius<rc040203@xxxxxxxxxx>  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

-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux