Commit 06c00c70 by Mark Mitchell Committed by Mark Mitchell

re PR c++/17929 (ICE with qualified name in template specialization)

	PR c++/17929
	* decl2.c (finish_anon_union): Robustify.

From-SVN: r88886
parent 6936e493
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> 2004-10-11 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (get_dynamic_cast_base_type): Rename to ... * cp-tree.h (get_dynamic_cast_base_type): Rename to ...
......
...@@ -1182,9 +1182,15 @@ build_anon_union_vars (tree object) ...@@ -1182,9 +1182,15 @@ build_anon_union_vars (tree object)
void void
finish_anon_union (tree anon_union_decl) finish_anon_union (tree anon_union_decl)
{ {
tree type = TREE_TYPE (anon_union_decl); tree type;
tree main_decl; 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. */ /* The VAR_DECL's context is the same as the TYPE's context. */
DECL_CONTEXT (anon_union_decl) = DECL_CONTEXT (TYPE_NAME (type)); DECL_CONTEXT (anon_union_decl) = DECL_CONTEXT (TYPE_NAME (type));
......
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