This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] Correct cdtest g++ version test
- From: Alan Modra <amodra at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 3 Dec 2016 10:55:32 -0000
- Subject: [binutils-gdb] Correct cdtest g++ version test
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f522190fa7f04a8d9a1dfc51d0cf69973c08afb5
commit f522190fa7f04a8d9a1dfc51d0cf69973c08afb5
Author: Alan Modra <amodra@gmail.com>
Date: Sat Dec 3 20:58:55 2016 +1030
Correct cdtest g++ version test
Fixes declaration conflict with built-in strncpy.
* testsuite/ld-cdtest/cdtest-foo.cc: Test for __GNUG__ >= 2.
Diff:
---
ld/ChangeLog | 4 ++++
ld/testsuite/ld-cdtest/cdtest-foo.cc | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/ld/ChangeLog b/ld/ChangeLog
index b86e203..c02f5e8 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,5 +1,9 @@
2016-12-03 Alan Modra <amodra@gmail.com>
+ * testsuite/ld-cdtest/cdtest-foo.cc: Test for __GNUG__ >= 2.
+
+2016-12-03 Alan Modra <amodra@gmail.com>
+
* ldexp.c (try_copy_symbol_type): Remove unnecessary check.
2016-12-02 Nick Clifton <nickc@redhat.com>
diff --git a/ld/testsuite/ld-cdtest/cdtest-foo.cc b/ld/testsuite/ld-cdtest/cdtest-foo.cc
index d8e5cbe..7e6bd75 100644
--- a/ld/testsuite/ld-cdtest/cdtest-foo.cc
+++ b/ld/testsuite/ld-cdtest/cdtest-foo.cc
@@ -5,7 +5,7 @@
// We don't use header files, since we only want to see, whether the
// compiler is installed properly.
//
-#if (__GNUG__ == 2)
+#if __GNUG__ >= 2
typedef __SIZE_TYPE__ size_t;
#else
typedef unsigned int size_t;