public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/19190] New: [4.0 regression] warning "value computed is not used" emitted too often
@ 2004-12-29 16:52 mueller at kde dot org
  2004-12-29 18:00 ` [Bug c++/19190] " pinskia at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: mueller at kde dot org @ 2004-12-29 16:52 UTC (permalink / raw)
  To: gcc-bugs

after the fix for #11224 it now emits the warning almost everywhere.. e.g. 
 
=== cut === 
struct breakme 
{ 
    void setAction( unsigned char a ) { act = a; } 
    unsigned int act:8; 
}; 
=== cut === 
 
$ g++ -Wall -c test.cc 
test.cc: In member function ‘void breakme::setAction(unsigned char)’: 
test.cc:3: warning: value computed is not used

-- 
           Summary: [4.0 regression] warning "value computed is not used"
                    emitted too often
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: c++
        AssignedTo: mmitchel at gcc dot gnu dot org
        ReportedBy: mueller at kde dot org
                CC: gcc-bugs at gcc dot gnu dot org
 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=19190


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

* [Bug c++/19190] [4.0 regression] warning "value computed is not used" emitted too often
  2004-12-29 16:52 [Bug c++/19190] New: [4.0 regression] warning "value computed is not used" emitted too often mueller at kde dot org
@ 2004-12-29 18:00 ` pinskia at gcc dot gnu dot org
  2004-12-29 20:40 ` mark at codesourcery dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-29 18:00 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-29 18:00 -------
Confirmed, I wonder if this is because there are casts added by the front-end:
(void) (unsigned int) 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |diagnostic
   Last reconfirmed|0000-00-00 00:00:00         |2004-12-29 18:00:54
               date|                            |
   Target Milestone|---                         |4.0.0


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


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

* [Bug c++/19190] [4.0 regression] warning "value computed is not used" emitted too often
  2004-12-29 16:52 [Bug c++/19190] New: [4.0 regression] warning "value computed is not used" emitted too often mueller at kde dot org
  2004-12-29 18:00 ` [Bug c++/19190] " pinskia at gcc dot gnu dot org
@ 2004-12-29 20:40 ` mark at codesourcery dot com
  2004-12-30  0:31 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: mark at codesourcery dot com @ 2004-12-29 20:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mark at codesourcery dot com  2004-12-29 20:40 -------
Subject: Re:  [4.0 regression] warning "value computed is not
 used" emitted too often

pinskia at gcc dot gnu dot org wrote:
> ------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-29 18:00 -------
> Confirmed, I wonder if this is because there are casts added by the front-end:
> (void) (unsigned int) 

No, it's because STRIP_NOPS doesn't work as I thought it did.  I'm 
testing a fix.



-- 


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


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

* [Bug c++/19190] [4.0 regression] warning "value computed is not used" emitted too often
  2004-12-29 16:52 [Bug c++/19190] New: [4.0 regression] warning "value computed is not used" emitted too often mueller at kde dot org
  2004-12-29 18:00 ` [Bug c++/19190] " pinskia at gcc dot gnu dot org
  2004-12-29 20:40 ` mark at codesourcery dot com
@ 2004-12-30  0:31 ` cvs-commit at gcc dot gnu dot org
  2004-12-30  0:32 ` mmitchel at gcc dot gnu dot org
  2004-12-30  3:51 ` mueller at kde dot org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-12-30  0:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-12-30 00:31 -------
Subject: Bug 19190

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2004-12-30 00:31:01

Modified files:
	gcc/cp         : ChangeLog cvt.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/warn: Wunused-10.C 

Log message:
	PR c++/19190
	* cvt.c (convert_to_void): Do not use STRIP_NOPs.
	
	PR c++/19190
	* g++.dg/warn/Wunused-10.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4562&r2=1.4563
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cvt.c.diff?cvsroot=gcc&r1=1.176&r2=1.177
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4826&r2=1.4827
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/warn/Wunused-10.C.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug c++/19190] [4.0 regression] warning "value computed is not used" emitted too often
  2004-12-29 16:52 [Bug c++/19190] New: [4.0 regression] warning "value computed is not used" emitted too often mueller at kde dot org
                   ` (2 preceding siblings ...)
  2004-12-30  0:31 ` cvs-commit at gcc dot gnu dot org
@ 2004-12-30  0:32 ` mmitchel at gcc dot gnu dot org
  2004-12-30  3:51 ` mueller at kde dot org
  4 siblings, 0 replies; 6+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-12-30  0:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-12-30 00:31 -------
Fixed in GCC 4.0.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug c++/19190] [4.0 regression] warning "value computed is not used" emitted too often
  2004-12-29 16:52 [Bug c++/19190] New: [4.0 regression] warning "value computed is not used" emitted too often mueller at kde dot org
                   ` (3 preceding siblings ...)
  2004-12-30  0:32 ` mmitchel at gcc dot gnu dot org
@ 2004-12-30  3:51 ` mueller at kde dot org
  4 siblings, 0 replies; 6+ messages in thread
From: mueller at kde dot org @ 2004-12-30  3:51 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mueller at kde dot org  2004-12-30 03:51 -------
Many thanks for your quick fix! 

-- 


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


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

end of thread, other threads:[~2004-12-30  3:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-29 16:52 [Bug c++/19190] New: [4.0 regression] warning "value computed is not used" emitted too often mueller at kde dot org
2004-12-29 18:00 ` [Bug c++/19190] " pinskia at gcc dot gnu dot org
2004-12-29 20:40 ` mark at codesourcery dot com
2004-12-30  0:31 ` cvs-commit at gcc dot gnu dot org
2004-12-30  0:32 ` mmitchel at gcc dot gnu dot org
2004-12-30  3:51 ` mueller at kde 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).