diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2021-08-25 22:27:22 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2021-08-25 22:29:27 +0100 |
commit | f1a08f4d7839a0197a28ecd9ca6d4400769da3a7 (patch) | |
tree | 611482c06749891a8d0a0f7eb25db39360e8510f | |
parent | 0163bbaaef119ef9e98c4b3dcba159609f77c818 (diff) | |
download | gcc-f1a08f4d7839a0197a28ecd9ca6d4400769da3a7.zip gcc-f1a08f4d7839a0197a28ecd9ca6d4400769da3a7.tar.gz gcc-f1a08f4d7839a0197a28ecd9ca6d4400769da3a7.tar.bz2 |
libstdc++: Fix names.cc test failures on Windows
The Windows CRT headers define structs with members called f, x, y etc
so don't check those. There are also lots of unnecessary function
parameters in mingw headers using non-reserved names, e.g.
<time.h> uses p and z as parameters of mingw_gettimeofday
<inttypes.h> uses j as a parameter of imaxabs
<pthread.h> uses l, o and func as parameter names
Those should be fixed in the headers instead.
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:
* testsuite/17_intro/names.cc: Adjust for Windows.
-rw-r--r-- | libstdc++-v3/testsuite/17_intro/names.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/17_intro/names.cc b/libstdc++-v3/testsuite/17_intro/names.cc index 3cbe0d2..b0cc21d 100644 --- a/libstdc++-v3/testsuite/17_intro/names.cc +++ b/libstdc++-v3/testsuite/17_intro/names.cc @@ -287,4 +287,14 @@ #endif // __VXWORKS__ +#ifdef _WIN32 +#undef Value +// <stdlib.h> defines _CRT_FLOAT::f +#undef f +// <stdlib.h> defines _CRT_DOUBLE::x and _LONGDOUBLE::x +#undef x +// <math.h> defines _complex::x and _complex::y +#undef y +#endif + #include <bits/stdc++.h> |