public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/clang] diag: Add clang specific DIAG_PUSH_NEEDS_COMMENT macros
@ 2022-10-04 12:57 Adhemerval Zanella
  0 siblings, 0 replies; 4+ messages in thread
From: Adhemerval Zanella @ 2022-10-04 12:57 UTC (permalink / raw)
  To: glibc-cvs

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

commit 11a3936c48655b43e12a5fc56987cbbcc67f3bcd
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 e1dbe99eb3..61e33d6c36 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) \

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [glibc/azanella/clang] diag: Add clang specific DIAG_PUSH_NEEDS_COMMENT macros
@ 2022-10-28 17:39 Adhemerval Zanella
  0 siblings, 0 replies; 4+ messages in thread
From: Adhemerval Zanella @ 2022-10-28 17:39 UTC (permalink / raw)
  To: glibc-cvs

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

commit a532b263f83bbf7f672224967200d626340e0525
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 e1dbe99eb3..61e33d6c36 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) \

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [glibc/azanella/clang] diag: Add clang specific DIAG_PUSH_NEEDS_COMMENT macros
@ 2023-02-09 19:46 Adhemerval Zanella
  0 siblings, 0 replies; 4+ messages in thread
From: Adhemerval Zanella @ 2023-02-09 19:46 UTC (permalink / raw)
  To: glibc-cvs

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) \

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [glibc/azanella/clang] diag: Add clang specific DIAG_PUSH_NEEDS_COMMENT macros
@ 2023-08-30 12:34 Adhemerval Zanella
  0 siblings, 0 replies; 4+ messages in thread
From: Adhemerval Zanella @ 2023-08-30 12:34 UTC (permalink / raw)
  To: glibc-cvs

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

commit bedfd81db81e2fc64e5afb541d5a4a4ce611b98d
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) \

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-08-30 12:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-04 12:57 [glibc/azanella/clang] diag: Add clang specific DIAG_PUSH_NEEDS_COMMENT macros Adhemerval Zanella
2022-10-28 17:39 Adhemerval Zanella
2023-02-09 19:46 Adhemerval Zanella
2023-08-30 12:34 Adhemerval Zanella

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).