This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ diagnostic] Handle MEMBER_REF/DOTSTAR_EXPR in C++ dump_expr (PR c++/33844)
- From: Gabriel Dos Reis <gdr at cs dot tamu dot edu>
- To: Paolo Carlini <pcarlini at suse dot de>
- Cc: Jakub Jelinek <jakub at redhat dot com>, Mark Mitchell <mark at codesourcery dot com>, Jason Merrill <jason at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: 26 Oct 2007 13:34:02 -0500
- Subject: Re: [C++ diagnostic] Handle MEMBER_REF/DOTSTAR_EXPR in C++ dump_expr (PR c++/33844)
- References: <20071026162321.GP5451@devserv.devel.redhat.com> <47221852.4070204@suse.de>
Paolo Carlini <pcarlini@suse.de> writes:
| Hi,
| > --- gcc/testsuite/g++.dg/other/ptrmem8.C.jj 2007-10-26 18:08:53.000000000 +0200
| > +++ gcc/testsuite/g++.dg/other/ptrmem8.C 2007-10-26 18:14:30.000000000 +0200
| > @@ -0,0 +1,16 @@
| > +// PR c++/33844
| > +// { dg-do compile }
| > +
| > +struct A {};
| > +
| > +template<int> void foo(void (A::* f)())
| > +{
| > + A a;
| > + &(a.*f); // { dg-error "invalid use of\[^\n\]*\\.\\*\[^\n\]*to form|qualified-id is required" }
| > +}
| > +
| > +template<int> void bar(void (A::* f)())
| > +{
| > + A *p;
| > + &(p->*f); // { dg-error "invalid use of\[^\n\]*->\\*\[^\n\]*to form|qualified-id is required" }
| > +}
| >
| In the output I'm seeing:
|
| Âfoo::a.*foo::f'
|
| and
|
| Âfoo::p->*foo::fÂ
|
| are we really sure we want to qualify with foo:: like that?
No, one would need to set a `scope' cutoff.
-- Gaby