[PATCH] Avoid -Wattribute-alias warnings for long double compat symbols
Jonathan Wakely
jwakely@redhat.com
Tue Oct 24 13:24:00 GMT 2017
The long double compat symbols are producing warnings, this
suppressess them.
* config/locale/gnu/c_locale.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]: Ignore
-Wattribute-alias warnings.
* src/c++11/istream-inst.cc: Likewise.
* src/c++11/locale-inst.cc: Likewise.
* src/c++11/ostream-inst.cc: Likewise.
* src/c++11/wlocale-inst.cc: Likewise.
* src/c++98/hash-long-double-tr1-aux.cc: Likewise.
Tested powerpc64le-linux, committed to trunk.
-------------- next part --------------
commit f26a72d3a24e853e1c4364a413d3b1ca0046ef22
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Tue Oct 24 13:52:35 2017 +0100
Avoid -Wattribute-alias warnings for long double compat symbols
* config/locale/gnu/c_locale.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]: Ignore
-Wattribute-alias warnings.
* src/c++11/istream-inst.cc: Likewise.
* src/c++11/locale-inst.cc: Likewise.
* src/c++11/ostream-inst.cc: Likewise.
* src/c++11/wlocale-inst.cc: Likewise.
* src/c++98/hash-long-double-tr1-aux.cc: Likewise.
diff --git a/libstdc++-v3/config/locale/gnu/c_locale.cc b/libstdc++-v3/config/locale/gnu/c_locale.cc
index 7c334e3a3e4..9aba3c2892f 100644
--- a/libstdc++-v3/config/locale/gnu/c_locale.cc
+++ b/libstdc++-v3/config/locale/gnu/c_locale.cc
@@ -289,6 +289,7 @@ _GLIBCXX_END_NAMESPACE_VERSION
// XXX GLIBCXX_ABI Deprecated
#ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
+#pragma GCC diagnostic ignored "-Wattribute-alias"
#define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
extern "C" void ldbl (void) __attribute__ ((alias (#dbl)))
_GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKP15__locale_struct, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKP15__locale_struct);
diff --git a/libstdc++-v3/src/c++11/istream-inst.cc b/libstdc++-v3/src/c++11/istream-inst.cc
index 96053044910..f5a9666b18c 100644
--- a/libstdc++-v3/src/c++11/istream-inst.cc
+++ b/libstdc++-v3/src/c++11/istream-inst.cc
@@ -97,6 +97,8 @@ _GLIBCXX_END_NAMESPACE_VERSION
// XXX GLIBCXX_ABI Deprecated
#ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
+#pragma GCC diagnostic ignored "-Wattribute-alias"
+
#define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
extern "C" void ldbl (void) __attribute__ ((alias (#dbl), weak))
_GLIBCXX_LDBL_COMPAT (_ZNSirsERd, _ZNSirsERe);
diff --git a/libstdc++-v3/src/c++11/locale-inst.cc b/libstdc++-v3/src/c++11/locale-inst.cc
index b0f79ffd619..c1b8e8d2b6b 100644
--- a/libstdc++-v3/src/c++11/locale-inst.cc
+++ b/libstdc++-v3/src/c++11/locale-inst.cc
@@ -383,6 +383,8 @@ _GLIBCXX_END_NAMESPACE_VERSION
#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined C_is_char \
&& _GLIBCXX_USE_CXX11_ABI == 0
+#pragma GCC diagnostic ignored "-Wattribute-alias"
+
#define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
extern "C" void ldbl (void) __attribute__ ((alias (#dbl), weak))
diff --git a/libstdc++-v3/src/c++11/ostream-inst.cc b/libstdc++-v3/src/c++11/ostream-inst.cc
index ef0038b51f2..12ddc8de02a 100644
--- a/libstdc++-v3/src/c++11/ostream-inst.cc
+++ b/libstdc++-v3/src/c++11/ostream-inst.cc
@@ -100,6 +100,8 @@ _GLIBCXX_END_NAMESPACE_VERSION
// XXX GLIBCXX_ABI Deprecated
#ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
+#pragma GCC diagnostic ignored "-Wattribute-alias"
+
#define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
extern "C" void ldbl (void) __attribute__ ((alias (#dbl), weak))
_GLIBCXX_LDBL_COMPAT (_ZNSolsEd, _ZNSolsEe);
diff --git a/libstdc++-v3/src/c++11/wlocale-inst.cc b/libstdc++-v3/src/c++11/wlocale-inst.cc
index 26fdf348c13..5a565cb190b 100644
--- a/libstdc++-v3/src/c++11/wlocale-inst.cc
+++ b/libstdc++-v3/src/c++11/wlocale-inst.cc
@@ -37,6 +37,8 @@
// XXX GLIBCXX_ABI Deprecated
#if defined _GLIBCXX_LONG_DOUBLE_COMPAT
+#pragma GCC diagnostic ignored "-Wattribute-alias"
+
#define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
extern "C" void ldbl (void) __attribute__ ((alias (#dbl), weak))
diff --git a/libstdc++-v3/src/c++98/hash-long-double-tr1-aux.cc b/libstdc++-v3/src/c++98/hash-long-double-tr1-aux.cc
index 28ee175ab0a..4612a44f04c 100644
--- a/libstdc++-v3/src/c++98/hash-long-double-tr1-aux.cc
+++ b/libstdc++-v3/src/c++98/hash-long-double-tr1-aux.cc
@@ -22,6 +22,8 @@
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
+#pragma GCC diagnostic ignored "-Wattribute-alias"
+
namespace std _GLIBCXX_VISIBILITY(default)
{
namespace tr1
More information about the Gcc-patches
mailing list