Re: RFA: PATCH to handle_transparent_union_attribute for c++/51228 (ICE on bogus use of transparent_union)

2011-12-19 Thread Jakub Jelinek
On Wed, Dec 14, 2011 at 05:14:18PM -0500, Jason Merrill wrote: --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -6286,13 +6286,21 @@ handle_transparent_union_attribute (tree *node, tree name, if (TREE_CODE (type) == UNION_TYPE) { - /* When IN_PLACE is set,

RFA: PATCH to handle_transparent_union_attribute for c++/51228 (ICE on bogus use of transparent_union)

2011-12-14 Thread Jason Merrill
It doesn't make sense to mark a type with no fields as a transparent union, and indeed handle_transparent_union checks for that. But this testcase was slipping past the checks because we're applying the attribute in place but after the type has been completed. This patch adjusts the check