about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-03-25 11:17:39 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-04-17 16:12:40 -0300
commita221274e314e48c3bd749ba3a491b430a864d29c (patch)
treece587aae201c861c358431b83e0133b29fa280f6
parent56765bcfde33b07a0fd59951c8fe0b088146351d (diff)
downloadglibc-a221274e314e48c3bd749ba3a491b430a864d29c.tar.gz
glibc-a221274e314e48c3bd749ba3a491b430a864d29c.tar.xz
glibc-a221274e314e48c3bd749ba3a491b430a864d29c.zip
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.
-rw-r--r--elf/tst-unique3.cc11
1 files 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)