This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/36744] function modifying argument received by-value affects caller's variable when passed as rvalue



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]