public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Florian Weimer <fw@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc/release/2.34/master] _Static_assert needs two arguments for compatibility with GCC before 9 Date: Tue, 29 Nov 2022 09:04:21 +0000 (GMT) [thread overview] Message-ID: <20221129090421.54A663851898@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a1c12fdf3f9b8665719835ce8330b3b2e2574b37 commit a1c12fdf3f9b8665719835ce8330b3b2e2574b37 Author: Florian Weimer <fweimer@redhat.com> Date: Fri Sep 10 13:18:36 2021 +0200 _Static_assert needs two arguments for compatibility with GCC before 9 This macro definition enforces two arguments even with newer compilers that accept the single-argument form, too. Reviewed-by: Carlos O'Donell <carlos@redhat.com> (cherry picked from commit c9fef4b7d1d0f2dad192c74f06102752247677a9) Diff: --- include/sys/cdefs.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/sys/cdefs.h b/include/sys/cdefs.h index 6a76160ed4..56adb231aa 100644 --- a/include/sys/cdefs.h +++ b/include/sys/cdefs.h @@ -1,5 +1,12 @@ #ifndef _SYS_CDEFS_H +/* This is outside of _ISOMAC to enforce that _Static_assert always + uses the two-argument form. This can be removed once the minimum + GCC version used to compile glibc is GCC 9.1. */ +#ifndef __cplusplus +# define _Static_assert(expr, diagnostic) _Static_assert (expr, diagnostic) +#endif + #include <misc/sys/cdefs.h> #ifndef _ISOMAC
reply other threads:[~2022-11-29 9:04 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=20221129090421.54A663851898@sourceware.org \ --to=fw@sourceware.org \ --cc=glibc-cvs@sourceware.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).