Commit affb3cb2 by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/32567 (ICE on invalid use of parameter pack)

	PR c++/32567
	* typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
	error_mark_node right away if build_expr_type_conversion
	returned it.

	* g++.dg/parse/crash36.C: New test.

From-SVN: r127760
parent 14693275
2007-08-24 Jakub Jelinek <jakub@redhat.com> 2007-08-24 Jakub Jelinek <jakub@redhat.com>
PR c++/32567
* typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
error_mark_node right away if build_expr_type_conversion
returned it.
PR c++/32898 PR c++/32898
* name-lookup.c (set_decl_namespace): lookup_qualified_name failure * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
is error_mark_node rather than NULL_TREE. is error_mark_node rather than NULL_TREE.
......
...@@ -4259,6 +4259,8 @@ build_unary_op (enum tree_code code, tree xarg, int noconvert) ...@@ -4259,6 +4259,8 @@ build_unary_op (enum tree_code code, tree xarg, int noconvert)
errstring ="no post-decrement operator for type"; errstring ="no post-decrement operator for type";
break; break;
} }
else if (arg == error_mark_node)
return error_mark_node;
/* Report something read-only. */ /* Report something read-only. */
......
2007-08-24 Jakub Jelinek <jakub@redhat.com>
PR c++/32567
* g++.dg/parse/crash36.C: New test.
2007-08-23 H.J. Lu <hongjiu.lu@intel.com> 2007-08-23 H.J. Lu <hongjiu.lu@intel.com>
* gcc.dg/pr32721.c: Updated. * gcc.dg/pr32721.c: Updated.
// PR c++/32567
// { dg-do compile }
// { dg-options "-std=c++98" }
template <typename... T> struct A // { dg-error "does not include variadic templates" }
{
static T &t; // { dg-error "not expanded with|T" }
static const int i = sizeof (++t); // { dg-error "invalid use of template type parameter" }
};
int x[A <int>::i]; // { dg-error "is not an integral constant-expression" }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment