Re: broken code only when optimized "-O2"

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

 



Hi Stefan,

On 12/21/21 17:05, Stefan Ring wrote:
On Tue, Dec 21, 2021 at 4:40 PM Adrian Moreno via Gcc-help
<gcc-help@xxxxxxxxxxx> wrote:

I'd really appreciate any hint or idea to try to understand this problem.

I guess the compiler doesn't like the dereferencing of uninitialized
pointers (in the sizeof expressions). I am not 100% sure that this
counts as dereferencing, but I would assume so. Because of this the
compiler will be free to behave however it likes to.


I agree that doesn't look good. Replacing them by sizeof (struct ___) expressions does not change the behavior though.

Thanks
--
Adrián Moreno




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux