This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13980] Can't assign a predefined const int 0 to a pointer
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Feb 2004 15:19:26 -0000
- Subject: [Bug c++/13980] Can't assign a predefined const int 0 to a pointer
- References: <20040202145717.13980.warp@iki.fi>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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