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

Richard Earnshaw <rearnsha at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
Address 0 is the same as the null pointer value and you haven't told the
compiler you're operating in a 'stand-alone' environment (in a hosted
environment dereferencing null is considered undefined behaviour).  If you
change the address to 4, you'll see what I mean.

You can add -ffreestanding to force the compiler to treat 0 as a valid address,
but this has other side-effects on the compilation as well.

Reply via email to