Re: broken code only when optimized "-O2"

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

 





On 12/22/21 11:27, Florian Weimer wrote:
* Adrian Moreno via Gcc-help:

So here I do not know what the compiler would think about "pos" if it
happens to point to some invalid stack address.

In such cases, the compiler typically assumes that the code in question
is never executed.  This means that the comparison does not need to be
performed, among other things.


So it wouldn't cause undefined behavior?

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