aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2018-03-17 13:44:16 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2018-03-17 13:44:16 +0000
commit0fb9dc36d2e70bd7ed34953fd67afca7181b938f (patch)
tree39315d5295f0595e319bc0dccceec68e4919f1fd
parent5e6ae0ccbb98cbe8b17080f69b43be089acba2f5 (diff)
downloadgcc-0fb9dc36d2e70bd7ed34953fd67afca7181b938f.zip
gcc-0fb9dc36d2e70bd7ed34953fd67afca7181b938f.tar.gz
gcc-0fb9dc36d2e70bd7ed34953fd67afca7181b938f.tar.bz2
Fix new test that fails in C++98 mode
* testsuite/20_util/function_objects/comparisons_pointer.cc: Adjust to compile as C++98. From-SVN: r258623
-rw-r--r--libstdc++-v3/ChangeLog5
-rw-r--r--libstdc++-v3/testsuite/20_util/function_objects/comparisons_pointer.cc20
2 files changed, 15 insertions, 10 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index c8c4656..a0da569 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,8 @@
+2018-03-17 Jonathan Wakely <jwakely@redhat.com>
+
+ * testsuite/20_util/function_objects/comparisons_pointer.cc: Adjust
+ to compile as C++98.
+
2018-03-14 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/78420
diff --git a/libstdc++-v3/testsuite/20_util/function_objects/comparisons_pointer.cc b/libstdc++-v3/testsuite/20_util/function_objects/comparisons_pointer.cc
index 6b2b8be0..aad0bc3 100644
--- a/libstdc++-v3/testsuite/20_util/function_objects/comparisons_pointer.cc
+++ b/libstdc++-v3/testsuite/20_util/function_objects/comparisons_pointer.cc
@@ -27,7 +27,7 @@ int a[8];
void
test01()
{
- auto p = a + 8;
+ int* p = a + 8;
std::greater<int*> gt;
std::stringstream ss;
@@ -44,7 +44,7 @@ test01()
ss.str("");
ss.clear();
sum = 0;
- auto p2 = a + 8;
+ int* p2 = a + 8;
std::greater<> gt2;
ss << gt2(p2, b) << ' ' << gt2(b, p2) << ' ' << (!gt2(p2, b) && !gt2(b, p2));
while (ss >> n)
@@ -59,7 +59,7 @@ test01()
void
test02()
{
- auto p = a + 8;
+ int* p = a + 8;
std::less<int*> lt;
std::stringstream ss;
@@ -76,7 +76,7 @@ test02()
ss.str("");
ss.clear();
sum = 0;
- auto p2 = a + 8;
+ int* p2 = a + 8;
std::less<> lt2;
ss << lt2(p2, b) << ' ' << lt2(b, p2) << ' ' << (!lt2(p2, b) && !lt2(b, p2));
while (ss >> n)
@@ -91,7 +91,7 @@ test02()
void
test03()
{
- auto p = a + 8;
+ int* p = a + 8;
std::greater_equal<int*> ge;
std::stringstream ss;
@@ -109,7 +109,7 @@ test03()
ss.str("");
ss.clear();
sum = 0;
- auto p2 = a + 8;
+ int* p2 = a + 8;
std::greater_equal<> ge2;
ss << !ge2(p2, b) << ' ' << !ge2(b, p2) << ' ' << (ge2(p2, b) && ge2(b, p2));
while (ss >> n)
@@ -125,7 +125,7 @@ test03()
void
test04()
{
- auto p = a + 8;
+ int* p = a + 8;
std::less_equal<int*> le;
std::stringstream ss;
@@ -143,7 +143,7 @@ test04()
ss.str("");
ss.clear();
sum = 0;
- auto p2 = a + 8;
+ int* p2 = a + 8;
std::less_equal<> le2;
ss << !le2(p2, b) << ' ' << !le2(b, p2) << ' ' << (le2(p2, b) && le2(b, p2));
while (ss >> n)
@@ -167,7 +167,7 @@ void
test05()
{
std::less<const X*> lt;
- auto p = y + 4;
+ X* p = y + 4;
std::stringstream ss;
ss << lt(x, p) << ' ' << lt(p, x) << ' ' << (!lt(p, x) && !lt(x, p));
int sum = 0;
@@ -183,7 +183,7 @@ test05()
ss.str("");
ss.clear();
sum = 0;
- auto p2 = y + 4;
+ X* p2 = y + 4;
std::less<> lt2;
ss << lt2(x, p2) << ' ' << lt2(p2, x) << ' ' << (!lt2(x, p2) && !lt2(p2, x));
while (ss >> n)