Add missing function in 20_util/exchange/1.cc.
When this test is compiled at -O0, the compiler does not remove the address comparison. This causes a link failure, since the body of f() is missing. * testsuite/20_util/exchange/1.cc: Add missing function bodies. From-SVN: r203629
This commit is contained in:
parent
1602204161
commit
37ea0d87a3
2 changed files with 9 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2013-10-15 Diego Novillo <dnovillo@google.com>
|
||||
|
||||
* testsuite/20_util/exchange/1.cc: Add missing function
|
||||
bodies.
|
||||
|
||||
2013-10-15 Tim Shen <timshen91@gmail.com>
|
||||
|
||||
PR libstdc++/58737
|
||||
|
|
|
@ -55,6 +55,10 @@ test02()
|
|||
VERIFY( old.value == 1 );
|
||||
}
|
||||
|
||||
int f(int) { return 0; }
|
||||
|
||||
double f(double) { return 0; }
|
||||
|
||||
// Deduce type of overloaded function
|
||||
void
|
||||
test03()
|
||||
|
@ -62,8 +66,6 @@ test03()
|
|||
bool test __attribute__((unused)) = true;
|
||||
|
||||
int (*fp)(int);
|
||||
int f(int);
|
||||
double f(double);
|
||||
std::exchange(fp, &f);
|
||||
VERIFY( fp != nullptr );
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue