This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/3601: GCC 3.0 barfs on overloaded operator==
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, markus_schoder at yahoo dot de, nobody at gcc dot gnu dot org
- Subject: Re: c++/3601: GCC 3.0 barfs on overloaded operator==
- From: lerdsuwa at gcc dot gnu dot org
- Date: 7 Jul 2001 13:19:33 -0000
Synopsis: GCC 3.0 barfs on overloaded operator==
State-Changed-From-To: open->closed
State-Changed-By: lerdsuwa
State-Changed-When: Sat Jul 7 06:19:33 2001
State-Changed-Why:
Not a bug. According to the standard Sectio 4.10 (Pointer
conversions) paragraph 1:
A null pointer constant is an integral constant expression
(5.19) rvalue of integer type that evaluates to zero. A
null pointer constant can be converted to a pointer type;
the result is the null pointer value of that type and is
is distinguishable from every other value of pointer to
object or pointer to function type. ...
Here 0 is "null pointer constant" and has to be converted
to "null pointer value" of type "void *".
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3601&database=gcc