On 01/05/20 14:45 +0100, Jonathan Wakely wrote:
On 01/05/20 15:21 +0200, Jakub Jelinek via Libstdc++ wrote:
On Fri, May 01, 2020 at 02:17:54PM +0100, Jonathan Wakely via Gcc-patches wrote:
The libstdc++ manual documents that _T can not be used, because it's a
macro in system headers on some targets.
PR libstdc++/94901
* include/std/type_traits (__is_complete_or_unbounded): Replace
BADNAME _T with _Tp.
* testsuite/17_intro/badnames.cc: New test.
Tested powerpc64le-linux and x86_64-linux, committed to master.
This should be backported to gcc-10 too.
Ok for 10 branch, thanks.
+#define _E9 _E9 is a BADNAME
+ // ..
+#define _E24 _E24 is a BADNAME
Just wonder about the above, IMHO it is worth spelling them all in between
too, otherwise we don't catch _E10 or _E13 or _E23 in libstdc++ headers.
OK, can do.
I decided it was pretty unlikely we'd have _E10 without hitting one of
the earlier ones, but I guess it's possible somebody would define _E12
to mean 10e12 or something.
I'll add that to master and then backport the enhanced version.
Here's the extra bit. Committed to master.
commit 187c854cc6284f546c151d6b6d4574d061e00d71
Author: Jonathan Wakely <jwak...@redhat.com>
Date: Fri May 1 14:49:48 2020 +0100
libstdc++: Add more tests for _E10, _E11 etc. (PR 94901)
PR libstdc++/94901
* testsuite/17_intro/badnames.cc: Test values between _E9 and _E24 too.
diff --git a/libstdc++-v3/testsuite/17_intro/badnames.cc b/libstdc++-v3/testsuite/17_intro/badnames.cc
index aabd01255e2..c69b8c45d81 100644
--- a/libstdc++-v3/testsuite/17_intro/badnames.cc
+++ b/libstdc++-v3/testsuite/17_intro/badnames.cc
@@ -40,7 +40,20 @@
#define _E7 _E7 is a BADNAME
#define _E8 _E8 is a BADNAME
#define _E9 _E9 is a BADNAME
- // ..
+#define _E10 _E10 is a BADNAME
+#define _E11 _E11 is a BADNAME
+#define _E12 _E12 is a BADNAME
+#define _E13 _E13 is a BADNAME
+#define _E14 _E14 is a BADNAME
+#define _E15 _E15 is a BADNAME
+#define _E16 _E16 is a BADNAME
+#define _E17 _E17 is a BADNAME
+#define _E18 _E18 is a BADNAME
+#define _E19 _E19 is a BADNAME
+#define _E20 _E20 is a BADNAME
+#define _E21 _E21 is a BADNAME
+#define _E22 _E22 is a BADNAME
+#define _E23 _E23 is a BADNAME
#define _E24 _E24 is a BADNAME
// Irix adds: