public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/38486]  New: Missing warning about type punning
@ 2008-12-11 12:57 dominik dot strasser at onespin-solutions dot com
  2008-12-11 12:58 ` [Bug c++/38486] " dominik dot strasser at onespin-solutions dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: dominik dot strasser at onespin-solutions dot com @ 2008-12-11 12:57 UTC (permalink / raw)
  To: gcc-bugs

When compiling the attached source code with -Wall -O3 -UWARN, no warning on
type punning is printed.
If I compile with -Wall -O3 -DWARN, a warning is printed.
ff.C:31: warning: dereferencing type-punned pointer will break strict-aliasing
rules

While in the attached example, everything seems to work fine, my application
crashes.

Would it be feasible to print the warning also for the nested function calls ?


-- 
           Summary: Missing warning about type punning
           Product: gcc
           Version: 4.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dominik dot strasser at onespin-solutions dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38486


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-05-20 15:15 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-11 12:57 [Bug c++/38486] New: Missing warning about type punning dominik dot strasser at onespin-solutions dot com
2008-12-11 12:58 ` [Bug c++/38486] " dominik dot strasser at onespin-solutions dot com
2008-12-11 13:17 ` [Bug middle-end/38486] " rguenth at gcc dot gnu dot org
2008-12-12  0:21 ` pinskia at gcc dot gnu dot org
2008-12-12 10:12 ` rguenth at gcc dot gnu dot org
2008-12-20 18:55 ` pinskia at gcc dot gnu dot org
2008-12-20 18:59 ` pinskia at gcc dot gnu dot org
2008-12-29 18:07 ` rguenth at gcc dot gnu dot org
2009-04-27 15:12 ` dominik dot strasser at onespin-solutions dot com
2009-04-27 15:19 ` rguenth at gcc dot gnu dot org
2009-05-20 15:15 ` rguenth at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).