This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: silence warnings building libstdc++


Currently, the libstdc++ build on powerpc-linux (and probably other
targets) produces these warnings:

[..]/libstdc++-v3/src/compatibility.cc:505: warning: â_ZTIeâ initialized and declared âexternâ
[..]/libstdc++-v3/src/compatibility.cc:508: warning: â_ZTIPeâ initialized and declared âexternâ
[..]/libstdc++-v3/src/compatibility.cc:511: warning: â_ZTIPKeâ initialized and declared âexternâ

I propose to silence these with the following patch.  No regressions
when running make check-target-libstdc++-v3.  OK for mainline?

Ben

2009-05-05  Ben Elliston  <bje@au.ibm.com>

        * src/compatibility.cc (_ZTIe, _ZTIPe, _ZTIPKe): Change type to
        const void * const.

Index: src/compatibility.cc
===================================================================
--- src/compatibility.cc        (revision 147143)
+++ src/compatibility.cc        (working copy)
@@ -502,13 +502,13 @@
 extern __attribute__((used, weak)) const char _ZTSe[2] = "e";
 extern __attribute__((used, weak)) const char _ZTSPe[3] = "Pe";
 extern __attribute__((used, weak)) const char _ZTSPKe[4] = "PKe";
-extern __attribute__((used, weak)) const void *_ZTIe[2]
+extern __attribute__((used, weak)) const void * const _ZTIe[2]
   = { (void *) &_ZTVN10__cxxabiv123__fundamental_type_infoE[2],
       (void *) _ZTSe };
-extern __attribute__((used, weak)) const void *_ZTIPe[4]
+extern __attribute__((used, weak)) const void * const _ZTIPe[4]
   = { (void *) &_ZTVN10__cxxabiv119__pointer_type_infoE[2],
       (void *) _ZTSPe, (void *) 0L, (void *) _ZTIe };
-extern __attribute__((used, weak)) const void *_ZTIPKe[4]
+extern __attribute__((used, weak)) const void * const _ZTIPKe[4]
   = { (void *) &_ZTVN10__cxxabiv119__pointer_type_infoE[2],
       (void *) _ZTSPKe, (void *) 1L, (void *) _ZTIe };
 #endif // _GLIBCXX_LONG_DOUBLE_COMPAT



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]