From: Jeff Law <jeffreyalaw@gmail.com>
To: Marek Polacek <polacek@redhat.com>,
GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] include: Fix -Wundef warnings in ansidecl.h
Date: Fri, 23 Jul 2021 11:38:14 -0600 [thread overview]
Message-ID: <ef7ad044-3578-5f4b-27ab-400d923ad1ea@gmail.com> (raw)
In-Reply-To: <20210720220129.198727-1-polacek@redhat.com>
On 7/20/2021 4:01 PM, Marek Polacek via Gcc-patches wrote:
> This quashes -Wundef warnings in ansidecl.h when compiled in C or C++.
> In C, __cpp_constexpr and __cplusplus aren't defined so we evaluate
> them to 0; conversely, __STDC_VERSION__ is not defined in C++.
> This has caused grief when -Wundef is used with -Werror.
>
> I've also tested -traditional-cpp.
>
> Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk?
>
> include/ChangeLog:
>
> * ansidecl.h: Check if __cplusplus is defined before checking
> the value of __cpp_constexpr and __cplusplus. Don't check
> __STDC_VERSION__ in C++.
OK
jeff
prev parent reply other threads:[~2021-07-23 17:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-20 22:01 Marek Polacek
2021-07-23 17:38 ` Jeff Law [this message]
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=ef7ad044-3578-5f4b-27ab-400d923ad1ea@gmail.com \
--to=jeffreyalaw@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=polacek@redhat.com \
/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: link
Be 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).