re PR c++/58979 (ICE with invalid use of pointer-to-member)

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

From-SVN: r204352
This commit is contained in:
Marek Polacek 2013-11-04 16:01:49 +00:00 committed by Marek Polacek
parent 9193fb0595
commit 55a7f02f06
4 changed files with 19 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2013-11-04 Marek Polacek <polacek@redhat.com>
PR c++/58979
* c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
2013-11-04 Joseph Myers <joseph@codesourcery.com>
* c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):

View File

@ -9934,6 +9934,11 @@ invalid_indirection_error (location_t loc, tree type, ref_operator errstring)
"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)",

View File

@ -1,3 +1,8 @@
2013-11-04 Marek Polacek <polacek@redhat.com>
PR c++/58979
* g++.dg/diagnostic/pr58979.C: New test.
2013-11-04 Joseph Myers <joseph@codesourcery.com>
* gcc.dg/iec-559-macros-1.c, gcc.dg/iec-559-macros-2.c,

View File

@ -0,0 +1,4 @@
// PR c++/58979
// { dg-do compile }
int i = 0->*0; // { dg-error "invalid type argument of" }