[Bug c++/36744] function modifying argument received by-value affects caller's variable when passed as rvalue
chris dot fairles at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sun Jul 6 19:52:00 GMT 2008
------- Comment #3 from chris dot fairles at gmail dot com 2008-07-06 19:51 -------
(In reply to comment #2)
> (In reply to comment #0)
> > struct S
> > {
> > S(): i(2) {}
> //S(S const&) {}
> S(S const&);
> The cctor need only be defined as well to get the same behavior (gcc 4.4.0,
> -std=c++0x, -fno-elide-constructors, -O0, -fno-inline).
And by defined I mean declared of course.
Chris
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36744
More information about the Gcc-bugs
mailing list