https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110683
Richard Biener changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110683
--- Comment #5 from Andrew Pinski ---
ms.c:299:24: warning: taking address of packed member of 'union U1' may result
in an unaligned pointer value [-Waddress-of-packed-member]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110683
--- Comment #4 from Andrew Pinski ---
(In reply to CTC from comment #3)
> The reduced program is
>
> # cat mss.i
> struct a {
> char b;
> int c;
> };
> union {
> struct a b;
> short c;
> } d = {8, 1};
> void main() { printf("%d\n", d.c)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110683
--- Comment #3 from CTC <19373742 at buaa dot edu.cn> ---
The reduced program is
# cat mss.i
struct a {
char b;
int c;
};
union {
struct a b;
short c;
} d = {8, 1};
void main() { printf("%d\n", d.c); }