public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc/azanella/clang] diag: Add clang specific DIAG_PUSH_NEEDS_COMMENT macros
Date: Thu,  9 Feb 2023 19:46:17 +0000 (GMT)	[thread overview]
Message-ID: <20230209194617.288DC3858C5F@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f61b027f83e9dc61e753bdcab984b71f02722800

commit f61b027f83e9dc61e753bdcab984b71f02722800
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Wed Aug 24 12:06:00 2022 -0300

    diag: Add clang specific DIAG_PUSH_NEEDS_COMMENT macros

Diff:
---
 include/libc-diag.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/include/libc-diag.h b/include/libc-diag.h
index f8fbda15a5..82ee6725bb 100644
--- a/include/libc-diag.h
+++ b/include/libc-diag.h
@@ -71,6 +71,19 @@
 # define DIAG_IGNORE_Os_NEEDS_COMMENT(version, option)
 #endif
 
+/* Same as before, but only enables the warning suppression for clang.
+   It is for clang-only issues and options that only clang emits.  */
+#ifdef __clang__
+# define DIAG_PUSH_NEEDS_COMMENT_CLANG _Pragma ("clang diagnostic push")
+# define DIAG_POP_NEEDS_COMMENT_CLANG _Pragma ("clang diagnostic pop")
+# define DIAG_IGNORE_NEEDS_COMMENT_CLANG(version, option) \
+  _Pragma (_DIAG_STR (clang diagnostic ignored option))
+#else
+# define DIAG_PUSH_NEEDS_COMMENT_CLANG
+# define DIAG_POP_NEEDS_COMMENT_CLANG
+# define DIAG_IGNORE_NEEDS_COMMENT_CLANG(version, option)
+#endif
+
 /* Some warnings are not support for all compilers.  */
 #ifndef __clang__
 # define DIAG_IGNORE_NEEDS_COMMENT_GCC(VERSION, WARNING) \

             reply	other threads:[~2023-02-09 19:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-09 19:46 Adhemerval Zanella [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-08-30 12:34 Adhemerval Zanella
2022-10-28 17:39 Adhemerval Zanella
2022-10-04 12:57 Adhemerval Zanella

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=20230209194617.288DC3858C5F@sourceware.org \
    --to=azanella@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: 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).