[patch c++]: Fix PR/64127 ICE on invalid: tree check: exprected identifier_node, have template_id_expr in cp_parser_diagnose_invalid_type_name

Kai Tietz ktietz70@googlemail.com
Thu Dec 4 18:17:00 GMT 2014


So added testcase for this pr (its c++98 only)

So:

ChangeLog testsuite

2014-12-04  Kai Tietz  <ktietz@redhat.com>

      PR c++/64127
      * g++.dg/cpp/pr64127.C: New file.

Tested on x86_64-unknown-linux-gnu.

Ok to apply prior posted patch plus this new testcase?

Regards,
Kai

Index: gcc/gcc/testsuite/g++.dg/cpp/pr64127.C
===================================================================
--- /dev/null
+++ gcc/gcc/testsuite/g++.dg/cpp/pr64127.C
@@ -0,0 +1,9 @@
+/* { dg-do compile { target c++98_only } } */
+
+template <0> int __copy_streambufs_eof; // { dg-error "" }
+// { dg-error "numeric constant" "" { target *-*-* } 3 }
+// { dg-warning "variable templates" "" { target *-*-* } 3 }
+__copy_streambufs_eof < // { dg-error "" }
+// { dg-error "parse error" "" { target *-*-* } 6 }
+// { dg-error "not name a type" "" { target *-*-* } 6 }
+



More information about the Gcc-patches mailing list