This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/50158] [4.7 Regression] invalid 'variable set but not used' warning (boolean used as an index to an array)


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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-08-23 15:53:23 UTC ---
Author: jakub
Date: Tue Aug 23 15:53:18 2011
New Revision: 177992

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177992
Log:
    PR c++/50158
    * typeck.c (cp_build_modify_expr): Call mark_rvalue_use on rhs
    if it has side-effects and needs to be preevaluated.

    * g++.dg/warn/Wunused-var-16.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/warn/Wunused-var-16.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/typeck.c
    trunk/gcc/testsuite/ChangeLog


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]