[cfe-commits] [PATCH] Improve transparent union support

Peter Collingbourne peter at pcc.me.uk
Sun Oct 24 11:34:13 PDT 2010


On Sat, Oct 23, 2010 at 07:44:43PM -0700, Eli Friedman wrote:
> On Sat, Oct 23, 2010 at 4:27 PM, Peter Collingbourne <peter at pcc.me.uk> wrote:
> > Hi,
> >
> > This implements a GNU C extension: two types are compatible if they
> > appear as a function argument, one of the types is a transparent
> > union type and the other type is compatible with a union member.
> >
> > OK to commit?
> 
> +  if (!getLangOptions().CPlusPlus && getLangOptions().GNUMode) {
> 
> This check is unnecessary; we can't have a TransparentUnionAttr unless
> the source uses GNU extensions, and we shouldn't ever get here in C++
> mode (mergeTypes doesn't have useful semantics in C++).
> 
> Otherwise, looks fine; go ahead and commit.

Thanks, committed as r117243.

-- 
Peter



More information about the cfe-commits mailing list