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-1845] libstdc++: Fix backwards logic in 17_intro/names.cc test [PR 97088] Date: Mon, 28 Jun 2021 15:25:34 +0000 (GMT) [thread overview] Message-ID: <20210628152534.193D1383B808@sourceware.org> (raw) https://gcc.gnu.org/g:75f948f089ceb8888fd00913635264e20610d0f2 commit r12-1845-g75f948f089ceb8888fd00913635264e20610d0f2 Author: Jonathan Wakely <jwakely@redhat.com> Date: Mon Jun 28 15:13:34 2021 +0100 libstdc++: Fix backwards logic in 17_intro/names.cc test [PR 97088] I meant to undef the names that clash with newlib headers for newlib, but I only undef'd them for non-newlib targets. This means they still cause errors for newlib, and aren't tested for other targets. This fixes the test to check those names for non-newlib targets, and to undef them to avoid errors for newlib. libstdc++-v3/ChangeLog: PR libstdc++/97088 * testsuite/17_intro/names.cc: Fix #if condition for names used by newlib headers. Diff: --- libstdc++-v3/testsuite/17_intro/names.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/libstdc++-v3/testsuite/17_intro/names.cc b/libstdc++-v3/testsuite/17_intro/names.cc index 805c1002c3f..aca7a8e5812 100644 --- a/libstdc++-v3/testsuite/17_intro/names.cc +++ b/libstdc++-v3/testsuite/17_intro/names.cc @@ -123,6 +123,10 @@ #define ptr ( #endif +// This clashes with newlib so don't use it. +# define __lockable cannot be used as an identifier + + // Common template parameter names #define OutputIterator OutputIterator is not a reserved name #define InputIterator InputIterator is not a reserved name @@ -222,9 +226,9 @@ #undef y #endif -#if ! __has_include(<newlib.h>) -// newlib's <sys/cdefs.h> defines __lockable as a macro, so we can't use it. -# define __lockable cannot be used as an identifier +#if __has_include(<newlib.h>) +// newlib's <sys/cdefs.h> defines __lockable as a macro. +#undef __lockable // newlib's <time.h> defines __tzrule_type with these members. #undef d #undef m
reply other threads:[~2021-06-28 15:25 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=20210628152534.193D1383B808@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).