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/63803] When GCC 4.9.2 compile with option -O2, the target is error.


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63803

ktkachov at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ktkachov at gcc dot gnu.org

--- Comment #4 from ktkachov at gcc dot gnu.org ---
The problem here is that the code uses undefined behaviour according to the C
standard (dereferencing NULL pointer), therefore the compiler is free to do
whatever it wants. The user code should be fixed to not do that.

GCC 4.9 is free to change its behaviour from 4.8 in such code because it makes
(and shouldn't make) no guarantees about undefined behaviour


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