On Mon, Nov 04, 2013 at 10:36:35AM -0500, Jason Merrill wrote:
> On 11/04/2013 05:50 AM, Marek Polacek wrote:
> >      case RO_ARROW:
> >+    case RO_ARROW_STAR:
> >        error_at (loc,
> >             "invalid type argument of %<->%> (have %qT)",
> >             type);
> 
> I think the diagnostic for RO_ARROW_STAR should say ->*, not just ->.

Ah, sorry about that.  What about this one?

2013-11-04  Marek Polacek  <pola...@redhat.com>

        PR c++/58979
c-family/
        * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
testsuite/
        * g++.dg/diagnostic/pr58979.C: New test.

--- gcc/c-family/c-common.c.mp  2013-11-04 16:44:48.674023654 +0100
+++ gcc/c-family/c-common.c     2013-11-04 16:45:52.632267904 +0100
@@ -9934,6 +9934,11 @@ invalid_indirection_error (location_t lo
                "invalid type argument of %<->%> (have %qT)",
                type);
       break;
+    case RO_ARROW_STAR:
+      error_at (loc,
+               "invalid type argument of %<->*%> (have %qT)",
+               type);
+      break;
     case RO_IMPLICIT_CONVERSION:
       error_at (loc,
                "invalid type argument of implicit conversion (have %qT)",
--- gcc/testsuite/g++.dg/diagnostic/pr58979.C.mp2       2013-11-04 
11:09:30.515553664 +0100
+++ gcc/testsuite/g++.dg/diagnostic/pr58979.C   2013-11-04 11:09:26.505538785 
+0100
@@ -0,0 +1,4 @@
+// PR c++/58979
+// { dg-do compile }
+
+int i = 0->*0; // { dg-error "invalid type argument of" }

        Marek

Reply via email to