This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[tree-ssa] PATCH to anonymous union handling


C++ anonymous unions have been broken since the last merge, because the
code in lookup_name_real wasn't removed.  This patch does that and makes
the appropriate edit in the new place where we handle these bits.

2003-02-07  Jason Merrill  <jason@redhat.com>

	* decl.c (lookup_name_real): Fix merge error.

	* parser.c (cp_parser_primary_expression): Unshare a COMPONENT_REF
	from an ALIAS_DECL.

*** decl.c.~1~	2003-02-05 17:20:40.000000000 -0500
--- decl.c	2003-02-07 13:21:23.000000000 -0500
*************** lookup_name_real (tree name, 
*** 5965,5973 ****
  	val = OVL_FUNCTION (val);
      }
  
-   if (val && TREE_CODE (val) == ALIAS_DECL)
-     val = unshare_expr (DECL_INITIAL (val));
- 
    return val;
  }
  
--- 5965,5970 ----
*** parser.c.~1~	2003-02-05 17:20:45.000000000 -0500
--- parser.c	2003-02-07 13:21:37.000000000 -0500
*************** cp_parser_primary_expression (cp_parser 
*** 2814,2820 ****
  	    /* Resolve references to variables of anonymous unions
  	       into COMPONENT_REFs.  */
  	    if (TREE_CODE (decl) == ALIAS_DECL)
! 	      decl = DECL_INITIAL (decl);
  	  }
  
  	if (TREE_DEPRECATED (decl))
--- 2814,2820 ----
  	    /* Resolve references to variables of anonymous unions
  	       into COMPONENT_REFs.  */
  	    if (TREE_CODE (decl) == ALIAS_DECL)
! 	      decl = unshare_expr (DECL_INITIAL (decl));
  	  }
  
  	if (TREE_DEPRECATED (decl))

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]