]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/17929 (ICE with qualified name in template specialization)
authorMark Mitchell <mark@codesourcery.com>
Mon, 11 Oct 2004 16:59:23 +0000 (16:59 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Mon, 11 Oct 2004 16:59:23 +0000 (16:59 +0000)
PR c++/17929
* decl2.c (finish_anon_union): Robustify.

From-SVN: r88886

gcc/cp/ChangeLog
gcc/cp/decl2.c

index f12c2775f2114435332f8c00d4d025b61cfe9120..5196df9db4fd02c5c6482a3ef1dd2dd4d0735c32 100644 (file)
@@ -1,3 +1,8 @@
+2004-10-11  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/17929
+       * decl2.c (finish_anon_union): Robustify.
+
 2004-10-11  Nathan Sidwell  <nathan@codesourcery.com>
 
        * cp-tree.h (get_dynamic_cast_base_type): Rename to ...
index 896fdfc1834560053fbc50eaa72f06de7e0025fc..7a55907ab6e63a055bb5f9cf9fbeb02fcff4739a 100644 (file)
@@ -1182,9 +1182,15 @@ build_anon_union_vars (tree object)
 void
 finish_anon_union (tree anon_union_decl)
 {
-  tree type = TREE_TYPE (anon_union_decl);
+  tree type;
   tree main_decl;
-  bool public_p = TREE_PUBLIC (anon_union_decl);
+  bool public_p;
+
+  if (anon_union_decl == error_mark_node)
+    return;
+
+  type = TREE_TYPE (anon_union_decl);
+  public_p = TREE_PUBLIC (anon_union_decl);
 
   /* The VAR_DECL's context is the same as the TYPE's context.  */
   DECL_CONTEXT (anon_union_decl) = DECL_CONTEXT (TYPE_NAME (type));