Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/cpp0x/Wredundant-move1.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
57 | 57 |
58 T | 58 T |
59 fn4 (const T t) | 59 fn4 (const T t) |
60 { | 60 { |
61 // t is const: will decay into copy despite std::move, so it's redundant. | 61 // t is const: will decay into copy despite std::move, so it's redundant. |
62 return std::move (t); // { dg-warning "redundant move in return statement" } | 62 // We used to warn about this, but no longer since c++/87378. |
63 return std::move (t); | |
63 } | 64 } |
64 | 65 |
65 int | 66 int |
66 fn5 (int i) | 67 fn5 (int i) |
67 { | 68 { |