[Bug middle-end/110292] undefined value due to strict aliasing without warning

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jun 16 21:29:57 GMT 2023


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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|WONTFIX                     |INVALID

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note -Wstrict-aliasing=1 actually does warn:
<source>: In function 'e':
<source>:13:29: warning: dereferencing type-punned pointer might break
strict-aliasing rules [-Wstrict-aliasing]
   13 |       struct c *h = (struct c *)f;
      |                             ^


More information about the Gcc-bugs mailing list