mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-14 11:39:48 +08:00
re PR c++/3471 (gcc 3.01 reports error about a private copy constructor that shouldn't get called.)
PR c++/3471 * call.c (convert_like_real): Do not build additional temporaries for rvalues of class type. From-SVN: r47455
This commit is contained in:
parent
c1d5afc412
commit
45aff9968e
@ -4,7 +4,7 @@ int count;
|
||||
|
||||
class A {
|
||||
A();
|
||||
A(const A&); // ERROR - referenced below
|
||||
A(const A&);
|
||||
public:
|
||||
A(int) { ++count; }
|
||||
~A() { --count; }
|
||||
@ -14,7 +14,7 @@ public:
|
||||
int main() {
|
||||
{
|
||||
A a (1);
|
||||
if (a == 2 || a == 1) // ERROR - private copy ctor
|
||||
if (a == 2 || a == 1)
|
||||
;
|
||||
}
|
||||
return count;
|
||||
|
Loading…
Reference in New Issue
Block a user