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.
This commit is contained in:
Jonathan Wakely 2023-01-06 20:54:23 +00:00
parent 61da01772a
commit 74852a3a2c

View file

@ -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;
}