aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/expr.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2010-06-07 19:50:10 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2010-06-07 19:50:10 +0200
commitd84686d14a6df2fbfe72830c1f6dc7456cca751e (patch)
tree6bf1acdbbbfd98a7996cc0ee8d991ab35560999a /gcc/cp/expr.c
parent026698d28e6eac591edfc8b1fd397e73b0503c56 (diff)
downloadgcc-d84686d14a6df2fbfe72830c1f6dc7456cca751e.zip
gcc-d84686d14a6df2fbfe72830c1f6dc7456cca751e.tar.gz
gcc-d84686d14a6df2fbfe72830c1f6dc7456cca751e.tar.bz2
re PR c++/44444 (-Wunused-but-set-variable problem with field references)
PR c++/44444 * expr.c (mark_exp_read): Handle INDIRECT_REF. * cvt.c (convert_to_void): Handle INDIRECT_REF like handled_component_p. * g++.dg/warn/Wunused-var-12.C: New test. From-SVN: r160388
Diffstat (limited to 'gcc/cp/expr.c')
-rw-r--r--gcc/cp/expr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/expr.c b/gcc/cp/expr.c
index ef5d6be..0a0ba53 100644
--- a/gcc/cp/expr.c
+++ b/gcc/cp/expr.c
@@ -1,7 +1,7 @@
/* Convert language-specific tree expression to rtl instructions,
for GNU compiler.
Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 2000, 2001, 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
+ 2000, 2001, 2002, 2003, 2004, 2007, 2010 Free Software Foundation, Inc.
This file is part of GCC.
@@ -132,6 +132,7 @@ mark_exp_read (tree exp)
case IMAGPART_EXPR:
CASE_CONVERT:
case ADDR_EXPR:
+ case INDIRECT_REF:
mark_exp_read (TREE_OPERAND (exp, 0));
break;
case COMPOUND_EXPR: