public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r12-3149] libstdc++: Fix names.cc test failures on Windows Date: Wed, 25 Aug 2021 23:08:30 +0000 (GMT) [thread overview] Message-ID: <20210825230830.0819B3858427@sourceware.org> (raw) https://gcc.gnu.org/g:f1a08f4d7839a0197a28ecd9ca6d4400769da3a7 commit r12-3149-gf1a08f4d7839a0197a28ecd9ca6d4400769da3a7 Author: Jonathan Wakely <jwakely@redhat.com> Date: Wed Aug 25 22:27:22 2021 +0100 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. Diff: --- libstdc++-v3/testsuite/17_intro/names.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libstdc++-v3/testsuite/17_intro/names.cc b/libstdc++-v3/testsuite/17_intro/names.cc index 3cbe0d2da54..b0cc21d6cda 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>
reply other threads:[~2021-08-25 23:08 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210825230830.0819B3858427@sourceware.org \ --to=redi@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).