re PR c++/43109 (ICE: SIGSEGV with unnamed namespace inside named)
PR c++/43109 * semantics.c (begin_class_definition): Don't crash on unnamed ns. From-SVN: r156864
This commit is contained in:
parent
746e119f8d
commit
935c0a5d24
4 changed files with 18 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2010-02-18 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/43109
|
||||
* semantics.c (begin_class_definition): Don't crash on unnamed ns.
|
||||
|
||||
2010-02-17 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/43075
|
||||
|
|
|
@ -2378,6 +2378,7 @@ begin_class_definition (tree t, tree attributes)
|
|||
tree ns = TYPE_CONTEXT (t);
|
||||
if (ns && TREE_CODE (ns) == NAMESPACE_DECL
|
||||
&& DECL_CONTEXT (ns) == std_node
|
||||
&& DECL_NAME (ns)
|
||||
&& !strcmp (IDENTIFIER_POINTER (DECL_NAME (ns)), "decimal"))
|
||||
{
|
||||
const char *n = TYPE_NAME_STRING (t);
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2010-02-18 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/43109
|
||||
* g++.dg/parse/namespace12.C: New.
|
||||
|
||||
2010-02-18 Martin Jambor <mjambor@suse.cz>
|
||||
|
||||
PR tree-optimization/43066
|
||||
|
|
7
gcc/testsuite/g++.dg/parse/namespace12.C
Normal file
7
gcc/testsuite/g++.dg/parse/namespace12.C
Normal file
|
@ -0,0 +1,7 @@
|
|||
// PR c++/43109
|
||||
|
||||
namespace std {
|
||||
namespace {
|
||||
struct S {};
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue