public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/50158] New: [4.7 Regression] invalid 'variable set but not used' warning (boolean used as index to an array)
@ 2011-08-22 19:22 zsojka at seznam dot cz
  2011-08-22 20:03 ` [Bug c++/50158] [4.7 Regression] invalid 'variable set but not used' warning (boolean used as an " zsojka at seznam dot cz
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: zsojka at seznam dot cz @ 2011-08-22 19:22 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50158
           Summary: [4.7 Regression] invalid 'variable set but not used'
                    warning (boolean used as index to an array)
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu


Created attachment 25080
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25080
reduced testcase

Compiler output:
$ gcc -Wunused-but-set-variable testcase.cpp -c
testcase.cpp: In function 'int foo(int)':
testcase.cpp:5:7: warning: variable 'array' set but not used
[-Wunused-but-set-variable]

The warning is give only when compiles as C++.

Tested revisions:
r177949 - fail
r173150 - OK
4.6.1 - OK


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

end of thread, other threads:[~2011-08-23 15:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-22 19:22 [Bug c++/50158] New: [4.7 Regression] invalid 'variable set but not used' warning (boolean used as index to an array) zsojka at seznam dot cz
2011-08-22 20:03 ` [Bug c++/50158] [4.7 Regression] invalid 'variable set but not used' warning (boolean used as an " zsojka at seznam dot cz
2011-08-22 20:42 ` rguenth at gcc dot gnu.org
2011-08-22 21:02 ` jakub at gcc dot gnu.org
2011-08-23 12:52 ` jakub at gcc dot gnu.org
2011-08-23 15:55 ` jakub at gcc dot gnu.org
2011-08-23 16:03 ` jakub at gcc dot gnu.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).