This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/36593] [4.4 Regression]: gfortran.dg/default_format_1.f90, 22_locale/num_get/get/char/2.cc
- From: "hp at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Jun 2008 13:13:36 -0000
- Subject: [Bug middle-end/36593] [4.4 Regression]: gfortran.dg/default_format_1.f90, 22_locale/num_get/get/char/2.cc
- References: <bug-36593-507@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from hp at gcc dot gnu dot org 2008-06-23 13:13 -------
(In reply to comment #5)
> Note that this type-punning using a union is ok, so it must be something
> else (or it is gccs fault in this case).
For the record, presumably (re our discussion on irc) you're confusing the
type-punning through a union extension with type-punning through a cast using a
type containing a union. The "type-punning through a union" extension
(documentation malplaced in invoke.texi @opindex fstrict-aliasing) has an
example that implies that using casts invalidates the extension. Let's defer
to the gcc@ list to be safe.
Warnings are emitted with -Wstrict-aliasing=1 and 2, but not 3.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36593