public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14024] New: g++ isn't reporting aliasing warnings
@ 2004-02-05  4:48 tjw at omnigroup dot com
  2004-02-05 15:59 ` [Bug c++/14024] " bangerth at dealii dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: tjw at omnigroup dot com @ 2004-02-05  4:48 UTC (permalink / raw)
  To: gcc-bugs

int test(int input)
{
    float *f = (float *)&input;
    return input;
}


When built with gcc:

$PREFIX/bin/gcc -Wstrict-aliasing -fstrict-aliasing -c alias.c
/tmp/alias.c: In function `test':
/tmp/alias.c:3: warning: dereferencing type-punned pointer will break strict-aliasing rules

But, when the same input is built with g++, no warning is issued.  This is bad since -fstrict-aliasing 
does seem to be taking effect (i.e., my real program produces crazy output with -fstrict-aliasing 
on), but no warnings are generating, meaning that it will be potentially very hard to track down the 
issue.

-- 
           Summary: g++ isn't reporting aliasing warnings
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tjw at omnigroup dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc-apple-darwin7.2.0
  GCC host triplet: powerpc-apple-darwin7.2.0
GCC target triplet: powerpc-apple-darwin7.2.0


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


^ permalink raw reply	[flat|nested] 12+ messages in thread
[parent not found: <bug-14024-7845@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2005-12-08 11:24 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-05  4:48 [Bug c++/14024] New: g++ isn't reporting aliasing warnings tjw at omnigroup dot com
2004-02-05 15:59 ` [Bug c++/14024] " bangerth at dealii dot org
2004-12-29  0:35 ` pinskia at gcc dot gnu dot org
2004-12-29  7:49 ` uros at kss-loka dot si
2005-09-16 14:16 ` pinskia at gcc dot gnu dot org
     [not found] <bug-14024-7845@http.gcc.gnu.org/bugzilla/>
2005-11-24 10:48 ` rguenth at gcc dot gnu dot org
2005-11-24 10:55 ` rguenth at gcc dot gnu dot org
2005-12-07 16:14 ` howarth at nitro dot med dot uc dot edu
2005-12-07 16:19 ` pinskia at gcc dot gnu dot org
2005-12-07 16:33 ` mueller at kde dot org
2005-12-07 16:38 ` pinskia at gcc dot gnu dot org
2005-12-08 11:24 ` 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).