aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2023-01-06 20:54:23 +0000
committerJonathan Wakely <jwakely@redhat.com>2023-01-06 21:06:28 +0000
commit74852a3a2cecbd6d7ac6ddc2d1a9b60b83367d60 (patch)
tree50a91ab55328c9044a3c9d8b0e5cd8e0e8a095f3
parent61da01772a3dff61cf23ba2ffba33bccb68d1063 (diff)
downloadgcc-74852a3a2cecbd6d7ac6ddc2d1a9b60b83367d60.zip
gcc-74852a3a2cecbd6d7ac6ddc2d1a9b60b83367d60.tar.gz
gcc-74852a3a2cecbd6d7ac6ddc2d1a9b60b83367d60.tar.bz2
libstdc++: Suppress -Waddress warning in tzdb.cc [PR108228]
For some tarets the weak symbol is always defined, so we get a warning that its address is never null. The warning isn't useful in this case, so suppress it. libstdc++-v3/ChangeLog: PR libstdc++/108228 * src/c++20/tzdb.cc (zoneinfo_dir): Add diagnostic pragma.
-rw-r--r--libstdc++-v3/src/c++20/tzdb.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/libstdc++-v3/src/c++20/tzdb.cc b/libstdc++-v3/src/c++20/tzdb.cc
index fa4f4c7..7227fe7 100644
--- a/libstdc++-v3/src/c++20/tzdb.cc
+++ b/libstdc++-v3/src/c++20/tzdb.cc
@@ -1013,9 +1013,12 @@ namespace std::chrono
string
zoneinfo_dir()
{
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Waddress"
static const string dir = __gnu_cxx::zoneinfo_dir_override
? __gnu_cxx::zoneinfo_dir_override()
: _GLIBCXX_ZONEINFO_DIR;
+#pragma GCC diagnostic pop
return dir;
}