This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/8171: pointers to member functions comparison
- From: bangerth at dealii dot org
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, zyzstar at ibl dot sk
- Date: 4 Nov 2002 16:15:08 -0000
- Subject: Re: c++/8171: pointers to member functions comparison
- Reply-to: bangerth at dealii dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, zyzstar at ibl dot sk, gcc-gnats at gcc dot gnu dot org
Synopsis: pointers to member functions comparison
State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Mon Nov 4 08:15:06 2002
State-Changed-Why:
I agree. In particular, the referenced part of the standard
states:
Pointer to member conversions(_conv.mem_) and
qualification conversions (_conv.qual_) are performed
to bring them to a common type.
This does not seem to happen. (Conversion by hand yields
the desired result though, so there is a way to work
around this problem.)
W.
PS: As a sidenote (for the curious), the standard also says
this on comparing pointers to member functions:
if either [operand] is a pointer to a virtual member func-
tion, the result is unspecified
That seems like a trap you don't want to fall into... (And
there isn't even a way for the compiler to warn you about.)
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8171