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
This commit is contained in:
parent
0f095169ae
commit
9b70c6b078
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
3
gcc/testsuite/g++.dg/parse/crash39.C
Normal file
3
gcc/testsuite/g++.dg/parse/crash39.C
Normal file
@ -0,0 +1,3 @@
|
||||
// PR c++/31747
|
||||
|
||||
static extern int i; // { dg-error "conflicting specifiers" }
|
Loading…
Reference in New Issue
Block a user