[Bug c++/13980] Can't assign a predefined const int 0 to a pointer
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Feb 2 15:19:00 GMT 2004
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-02-02 15:19 -------
This is a dup of bug 396, basically the`Stroustrup's "The C++ progamming language"' is old
should not be trusted when it comes things like this.
>From that bug:
a null pointer constant is an integral constant expression
rvalue that evaluates to zero [4.10/1] in this case
`null' is an lvalue. The standard does not specify that
lvalue->rvalue decay happens here, so `null' is not a null
pointer constant.
*** This bug has been marked as a duplicate of 396 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13980
More information about the Gcc-bugs
mailing list