Commit 935c0a5d by Jason Merrill Committed by Jason Merrill

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
parent 746e119f
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> 2010-02-17 Jason Merrill <jason@redhat.com>
PR c++/43075 PR c++/43075
......
...@@ -2378,6 +2378,7 @@ begin_class_definition (tree t, tree attributes) ...@@ -2378,6 +2378,7 @@ begin_class_definition (tree t, tree attributes)
tree ns = TYPE_CONTEXT (t); tree ns = TYPE_CONTEXT (t);
if (ns && TREE_CODE (ns) == NAMESPACE_DECL if (ns && TREE_CODE (ns) == NAMESPACE_DECL
&& DECL_CONTEXT (ns) == std_node && DECL_CONTEXT (ns) == std_node
&& DECL_NAME (ns)
&& !strcmp (IDENTIFIER_POINTER (DECL_NAME (ns)), "decimal")) && !strcmp (IDENTIFIER_POINTER (DECL_NAME (ns)), "decimal"))
{ {
const char *n = TYPE_NAME_STRING (t); const char *n = TYPE_NAME_STRING (t);
......
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> 2010-02-18 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/43066 PR tree-optimization/43066
......
// PR c++/43109
namespace std {
namespace {
struct S {};
}
}
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