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: Paolo Carlini <pcarlini at suse dot de>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Mark Mitchell <mark at codesourcery dot com>, Jason Merrill <jason at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 26 Oct 2007 18:39:46 +0200
- Subject: Re: [C++ diagnostic] Handle MEMBER_REF/DOTSTAR_EXPR in C++ dump_expr (PR c++/33844)
- References: <20071026162321.GP5451@devserv.devel.redhat.com>
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?
Thanks,
Paolo.