public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/28280]  New: [4.2 regression] bogus "statement with no effect" warning
@ 2006-07-06  9:14 tbm at cyrius dot com
  2006-07-06 14:51 ` [Bug c/28280] " pinskia at gcc dot gnu dot org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: tbm at cyrius dot com @ 2006-07-06  9:14 UTC (permalink / raw)
  To: gcc-bugs

gcc 4.2 shows the following bogus warning message.  I'm not sure whether this
is a regression or a new warning but it would be great if this could be
improved.  The warning shows up in elfutils, the minimal testcase was extracted
by Eugeniy Meshcheryakov.
41714:tbm@deprecation: ~] /usr/lib/gcc-snapshot/bin/gcc -c -W -Wall test.c
test.c: In function 'fun':
test.c:9: warning: statement with no effect
41715:tbm@deprecation: ~] gcc-4.1 -c -W -Wall test.c
41716:tbm@deprecation: ~] cat test.c
#include <inttypes.h>

void * fun(char *desc, int descsz)
{
        struct
        {
                uint32_t os;
                uint32_t version[descsz / 4 - 1];
        } *tag = (__typeof (tag)) desc;

        return tag;
}


-- 
           Summary: [4.2 regression] bogus "statement with no effect"
                    warning
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tbm at cyrius dot com


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


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

end of thread, other threads:[~2006-08-15 18:04 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-06  9:14 [Bug debug/28280] New: [4.2 regression] bogus "statement with no effect" warning tbm at cyrius dot com
2006-07-06 14:51 ` [Bug c/28280] " pinskia at gcc dot gnu dot org
2006-07-06 15:12 ` [Bug c/28280] [4.2 regression] bogus "statement with no effect" warning with VLA and typeof pinskia at gcc dot gnu dot org
2006-07-06 15:13 ` pinskia at gcc dot gnu dot org
2006-07-08 10:10 ` mrs at apple dot com
2006-07-12 13:12 ` mrs at gcc dot gnu dot org
2006-07-12 13:13 ` mrs at apple dot com
2006-07-12 17:23 ` pinskia at gcc dot gnu dot org
2006-07-15 17:04 ` mrs at gcc dot gnu dot org
2006-07-15 18:52 ` mrs at apple dot com
2006-07-15 18:58 ` pinskia at gcc dot gnu dot org
2006-07-17  3:08 ` mmitchel at gcc dot gnu dot org
2006-08-15 16:17 ` jsm28 at gcc dot gnu dot org
2006-08-15 18:01 ` mrs at gcc dot gnu dot org
2006-08-15 18:04 ` pinskia 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).