This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/28073] Type-punned pointer passed as function parameter generates bad assembly sequence
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jun 2006 21:06:08 -0000
- Subject: [Bug c/28073] Type-punned pointer passed as function parameter generates bad assembly sequence
- References: <bug-28073-12847@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from rguenth at gcc dot gnu dot org 2006-06-19 21:04 -------
Created an attachment (id=11706)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11706&action=view)
warn for bad casts hiding type-punning
At suse we used the attached patch to teach packagers not "fix" strict aliasing
warnings by introducing a (void *) cast inbetween. Sort of a compromise
between too much false positives and catching all evil use.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28073