http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59552
Bug ID: 59552
Summary: Warning when non-trivial type parameter is passed by
value but not changed in function
Product: gcc
Version: 4.8.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eugene.zelenko at gmail dot com
Hi!
I think will be good idea to introduce warnings for situations when non-trivial
type (of big size or with non-default copy constructor, for example, STL
container) parameter is passed by value but not changed in function (only const
methods are called), so in this case const reference should be used instead.
Eugene.