public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/44361]  New: -Wunused-but-set-variable vs. explicit void cast
@ 2010-06-01 11:14 jakub at gcc dot gnu dot org
  2010-06-01 11:17 ` [Bug c++/44361] " jakub at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-06-01 11:14 UTC (permalink / raw)
  To: gcc-bugs

As noted by richi, gcc fails to bootstrap with --enable-build-with-cxx:
gcc/tree-flow-inline.h:854:8: error: variable 't' set but not used
[-Werror=unused-but-set-variable]


-- 
           Summary: -Wunused-but-set-variable vs. explicit void cast
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jakub at gcc dot gnu dot org


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


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

* [Bug c++/44361] -Wunused-but-set-variable vs. explicit void cast
  2010-06-01 11:14 [Bug c++/44361] New: -Wunused-but-set-variable vs. explicit void cast jakub at gcc dot gnu dot org
@ 2010-06-01 11:17 ` jakub at gcc dot gnu dot org
  2010-06-01 15:05 ` jakub at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-06-01 11:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from jakub at gcc dot gnu dot org  2010-06-01 11:16 -------
Created an attachment (id=20791)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20791&action=view)
gcc46-pr44361.patch

Untested fix.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED


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


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

* [Bug c++/44361] -Wunused-but-set-variable vs. explicit void cast
  2010-06-01 11:14 [Bug c++/44361] New: -Wunused-but-set-variable vs. explicit void cast jakub at gcc dot gnu dot org
  2010-06-01 11:17 ` [Bug c++/44361] " jakub at gcc dot gnu dot org
@ 2010-06-01 15:05 ` jakub at gcc dot gnu dot org
  2010-06-02 19:57 ` jakub at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-06-01 15:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jakub at gcc dot gnu dot org  2010-06-01 15:05 -------
Created an attachment (id=20799)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20799&action=view)
gcc46-pr44361.patch

Updated patch.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #20791|0                           |1
        is obsolete|                            |


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


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

* [Bug c++/44361] -Wunused-but-set-variable vs. explicit void cast
  2010-06-01 11:14 [Bug c++/44361] New: -Wunused-but-set-variable vs. explicit void cast jakub at gcc dot gnu dot org
  2010-06-01 11:17 ` [Bug c++/44361] " jakub at gcc dot gnu dot org
  2010-06-01 15:05 ` jakub at gcc dot gnu dot org
@ 2010-06-02 19:57 ` jakub at gcc dot gnu dot org
  2010-06-02 20:02 ` jakub at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-06-02 19:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jakub at gcc dot gnu dot org  2010-06-02 19:57 -------
Subject: Bug 44361

Author: jakub
Date: Wed Jun  2 19:57:08 2010
New Revision: 160188

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160188
Log:
        PR c++/44361
        * cvt.c (convert_to_void): If implicit is NULL, call mark_rvalue_use
        instead of calling mark_exp_read only when not an assignment.

Modified:
    trunk/gcc/cp/ChangeLog


-- 


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


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

* [Bug c++/44361] -Wunused-but-set-variable vs. explicit void cast
  2010-06-01 11:14 [Bug c++/44361] New: -Wunused-but-set-variable vs. explicit void cast jakub at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2010-06-02 19:57 ` jakub at gcc dot gnu dot org
@ 2010-06-02 20:02 ` jakub at gcc dot gnu dot org
  2010-06-05 14:49 ` jakub at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-06-02 20:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jakub at gcc dot gnu dot org  2010-06-02 20:02 -------
I've committed just the C++ FE change that has been approved separately, in
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160187
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160188

The C FE and testsuite changes are still awaiting approval.


-- 


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


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

* [Bug c++/44361] -Wunused-but-set-variable vs. explicit void cast
  2010-06-01 11:14 [Bug c++/44361] New: -Wunused-but-set-variable vs. explicit void cast jakub at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2010-06-02 20:02 ` jakub at gcc dot gnu dot org
@ 2010-06-05 14:49 ` jakub at gcc dot gnu dot org
  2010-06-05 15:03 ` jakub at gcc dot gnu dot org
  2010-06-05 19:01 ` jakub at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-06-05 14:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jakub at gcc dot gnu dot org  2010-06-05 14:49 -------
Subject: Bug 44361

Author: jakub
Date: Sat Jun  5 14:49:16 2010
New Revision: 160317

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160317
Log:
        PR c++/44361
        * c-typeck.c (mark_exp_read): Handle C_MAYBE_CONST_EXPR.
        * c-parser.c (c_parser_postfix_expression): Call mark_exp_read on
        statement expression.

        * c-c++-common/Wunused-var-9.c: New test.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-parser.c
    trunk/gcc/c-typeck.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/44361] -Wunused-but-set-variable vs. explicit void cast
  2010-06-01 11:14 [Bug c++/44361] New: -Wunused-but-set-variable vs. explicit void cast jakub at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2010-06-05 14:49 ` jakub at gcc dot gnu dot org
@ 2010-06-05 15:03 ` jakub at gcc dot gnu dot org
  2010-06-05 19:01 ` jakub at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-06-05 15:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jakub at gcc dot gnu dot org  2010-06-05 15:02 -------
Subject: Bug 44361

Author: jakub
Date: Sat Jun  5 15:02:32 2010
New Revision: 160318

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160318
Log:
        PR c++/44361
        * c-typeck.c (mark_exp_read): Handle C_MAYBE_CONST_EXPR.
        * c-parser.c (c_parser_postfix_expression): Call mark_exp_read on
        statement expression.

        * c-c++-common/Wunused-var-9.c: New test.

Added:
    trunk/gcc/testsuite/c-c++-common/Wunused-var-9.c


-- 


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


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

* [Bug c++/44361] -Wunused-but-set-variable vs. explicit void cast
  2010-06-01 11:14 [Bug c++/44361] New: -Wunused-but-set-variable vs. explicit void cast jakub at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2010-06-05 15:03 ` jakub at gcc dot gnu dot org
@ 2010-06-05 19:01 ` jakub at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-06-05 19:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jakub at gcc dot gnu dot org  2010-06-05 19:00 -------
Fixed.


-- 

jakub at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2010-06-05 19:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-01 11:14 [Bug c++/44361] New: -Wunused-but-set-variable vs. explicit void cast jakub at gcc dot gnu dot org
2010-06-01 11:17 ` [Bug c++/44361] " jakub at gcc dot gnu dot org
2010-06-01 15:05 ` jakub at gcc dot gnu dot org
2010-06-02 19:57 ` jakub at gcc dot gnu dot org
2010-06-02 20:02 ` jakub at gcc dot gnu dot org
2010-06-05 14:49 ` jakub at gcc dot gnu dot org
2010-06-05 15:03 ` jakub at gcc dot gnu dot org
2010-06-05 19:01 ` jakub 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).