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

Eli Friedman eli.friedman at gmail.com
Sat Oct 23 19:44:43 PDT 2010

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.


More information about the cfe-commits mailing list