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

--- Comment #2 from Richard Smith <richard-gccbugzilla at metafoo dot co.uk> ---
Hm, that doesn't explain why the second example I gave is accepted. But I
suppose what's happening there is probably just that the `packed` attribute is
ignored entirely for fields with alignment 1, so this behaves the same as

```
packed_int i;
int &r = i;
```

... which indeed doesn't produce an error or even a warning, presumably for the
same reason (the alignment isn't part of the canonical type of i).

Reply via email to