diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-02-17 20:44:14 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-02-17 20:44:14 +0000 |
commit | 3d37a1764298176432210ae4795df67a759492fc (patch) | |
tree | e18b77a0c9dfc6662d8f98605504c231b6eee9b9 /gcc/cp/cvt.c | |
parent | abb2a4bd504c9958ac546e455e43edd369f9a885 (diff) | |
download | gcc-3d37a1764298176432210ae4795df67a759492fc.tar.gz |
PR c++/47783
* cvt.c (convert_from_reference): Call mark_exp_read.
* g++.dg/warn/Wunused-parm-4.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170255 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cvt.c')
-rw-r--r-- | gcc/cp/cvt.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c index 36c07037a8d..8ab00011432 100644 --- a/gcc/cp/cvt.c +++ b/gcc/cp/cvt.c @@ -512,6 +512,7 @@ convert_from_reference (tree val) tree t = TREE_TYPE (TREE_TYPE (val)); tree ref = build1 (INDIRECT_REF, t, val); + mark_exp_read (val); /* We *must* set TREE_READONLY when dereferencing a pointer to const, so that we get the proper error message if the result is used to assign to. Also, &* is supposed to be a no-op. */ |