[glibc/azanella/clang] elf: Suppress clang warning on tst-unique3
Adhemerval Zanella
azanella@sourceware.org
Fri Feb 9 17:35:25 GMT 2024
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2371bcff0a055ebe6759ad558e52204ce190bd48
commit 2371bcff0a055ebe6759ad558e52204ce190bd48
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Fri Mar 25 11:17:39 2022 -0300
elf: Suppress clang warning on tst-unique3
clang warns that the instatiation of the variable is required,
but no definition is available. They are implemented on
tst-unique3lib.so.
Checked on x86_64-linux-gnu.
Diff:
---
elf/tst-unique3.cc | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/elf/tst-unique3.cc b/elf/tst-unique3.cc
index efdd6d78c2..d07601fe6d 100644
--- a/elf/tst-unique3.cc
+++ b/elf/tst-unique3.cc
@@ -1,9 +1,14 @@
-#include "tst-unique3.h"
-
#include <cstdio>
-#include "../dlfcn/dlfcn.h"
+#include <dlfcn.h>
+#include <libc-diag.h>
+#include "tst-unique3.h"
+/* clang warns that the instatiation of the variable is required, but no
+ definition is available. They are implemented on tst-unique3lib.so. */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wundefined-var-template");
int t = S<char>::i;
+DIAG_POP_NEEDS_COMMENT_CLANG;
int
main (void)
More information about the Glibc-cvs
mailing list