build_duplicate_type and transparent_union

Richard Guenther
Wed Mar 28 09:48:00 GMT 2007

Whilst looking over tree-inline.c I noticed that the only user of
build_duplicate_type (transparent_union handling) does now a no-op
transform of its type.  With r105338 remap_type got splitted up into
remap_type_1 and remap_type so the new build_duplicate_type would always
build a new type, but that change was made a no-op by putting back
the body if remap_type into remap_type_1 (making the former useless now)
by r109797 (both from rth).

It also looks like we don't have a testcase for

          /* A type variant isn't good enough, since we don't want a cast
             to such a type removed as a no-op.  */

as stated in handle_transparent_union_attribute, but I believe that
it would be broken now (as clearly unions cannot be of variable modified

Now, can you please clarify and/or fix it up somehow? ;)


More information about the Gcc-patches mailing list