This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/51885] g++ compiler options -O2 and -O3 modifies program results


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51885

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-01-17 18:38:35 UTC ---
What happens if you add to the command line -fno-strict-aliasing? If things
'improve' it means that with your reinterpret_cast & co you have aliasing
violations, thus undefined behavior, thus, literally, anything can happen, and
this is not a bug (and we have hundreds of closed duplicate PRs in Bugzilla)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]