aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/semantics.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 9ebc609..357b925 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 90a76d9..24390d9 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -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);