c++/3601: GCC 3.0 barfs on overloaded operator==

lerdsuwa@gcc.gnu.org lerdsuwa@gcc.gnu.org
Sat Jul 7 06:19:00 GMT 2001


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



More information about the Gcc-bugs mailing list