[Bug target/116063] [PPC] Transparent union issue with signedness when optimizing

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jul 24 03:31:41 GMT 2024


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116063

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Hubert Tong from comment #2)
> If it is invalid, a diagnostic like this should appear:
> ```
> warning: union cannot be made transparent
> ```

Not always.
typedef union __attribute__((__transparent_union__)) U {
  unsigned int u;
  int x;
} U;

also fails the same way because signed int and unsigned int are passed
differently.


More information about the Gcc-bugs mailing list