The following code used to compile with gcc 3.3. It 3.4 emits an error. [dlee@lindb1 cpp]$ cat nocopy.cpp class Foo { public: Foo(int) {} private: Foo(Foo const &); Foo&operator=(Foo const &); }; void foobar(Foo const &); int main() { Foo const a(0); foobar(a); foobar(Foo(0)); // nocopy.cpp:6: error: `Foo::Foo(const Foo&)' is private // nocopy.cpp:16: error: within this context } [dlee@lindb1 cpp]$ i686-linux-g++ nocopy.cpp -o /dev/null nocopy.cpp: In function `int main()': nocopy.cpp:6: error: `Foo::Foo(const Foo&)' is private nocopy.cpp:16: error: within this context
http://gcc.gnu.org/bugs.html#cxx_rvalbind
Reopening bug to mark as a dup of ...
bug 12226. *** This bug has been marked as a duplicate of 12226 ***