Commit 9b70c6b0 by Paolo Carlini Committed by Paolo Carlini

re PR c++/31747 (ICE combining static and extern)

cp/
2007-10-26  Paolo Carlini  <pcarlini@suse.de>

	PR c++/31747
	* decl.c (grokdeclarator): In case of conflicting specifiers
	just return error_mark_node.

testsuite/
2007-10-26  Paolo Carlini  <pcarlini@suse.de>

	PR c++/31747
	* g++.dg/parse/crash39.C: New.

From-SVN: r129647
parent 0f095169
2007-10-26 Paolo Carlini <pcarlini@suse.de>
PR c++/31747
* decl.c (grokdeclarator): In case of conflicting specifiers
just return error_mark_node.
2007-10-26 Ollie Wild <aaw@google.com>
* expr.c (cxx_expand_expr): Removed.
......
......@@ -7552,6 +7552,12 @@ grokdeclarator (const cp_declarator *declarator,
return error_mark_node;
}
if (declspecs->conflicting_specifiers_p)
{
error ("conflicting specifiers in declaration of %qs", name);
return error_mark_node;
}
/* Extract the basic type from the decl-specifier-seq. */
type = declspecs->type;
if (type == error_mark_node)
......@@ -7846,15 +7852,10 @@ grokdeclarator (const cp_declarator *declarator,
error ("multiple storage classes in declaration of %qs", name);
thread_p = false;
}
if (declspecs->conflicting_specifiers_p)
{
error ("conflicting specifiers in declaration of %qs", name);
storage_class = sc_none;
}
else if (decl_context != NORMAL
&& ((storage_class != sc_none
&& storage_class != sc_mutable)
|| thread_p))
if (decl_context != NORMAL
&& ((storage_class != sc_none
&& storage_class != sc_mutable)
|| thread_p))
{
if ((decl_context == PARM || decl_context == CATCHPARM)
&& (storage_class == sc_register
......
2007-10-26 Paolo Carlini <pcarlini@suse.de>
PR c++/31747
* g++.dg/parse/crash39.C: New.
2007-10-26 Uros Bizjak <ubizjak@gmail.com>
* g++.dg/tree-ssa/ivopts-1.C: Remove xfail on the search for
// PR c++/31747
static extern int i; // { dg-error "conflicting specifiers" }
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