]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
compatibility.cc (_ZTIe): Use reinterpret_cast<const cast *> to avoid -Wcast-qual...
authorUros Bizjak <ubizjak@gmail.com>
Sat, 17 Aug 2013 10:23:41 +0000 (12:23 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Sat, 17 Aug 2013 10:23:41 +0000 (12:23 +0200)
* src/c++98/compatibility.cc (_ZTIe): Use
reinterpret_cast<const cast *> to avoid -Wcast-qual warnings.
(_ZTIPe): Ditto.
(ZTIPKe): Ditto.

From-SVN: r201813

libstdc++-v3/ChangeLog
libstdc++-v3/src/c++98/compatibility.cc

index bde4f5bf50d87b5856b747d9d4eb72d75171ee45..3c9ad3ddba899632e4e78b0b8d862ee6bc3bb7f3 100644 (file)
@@ -1,3 +1,10 @@
+2013-08-17  Uros Bizjak  <ubizjak@gmail.com>
+
+       * src/c++98/compatibility.cc (_ZTIe): Use
+       reinterpret_cast<const cast *> to avoid -Wcast-qual warnings.
+       (_ZTIPe): Ditto.
+       (ZTIPKe): Ditto.
+
 2013-05-15  Jonathan Wakely  <jwakely.gcc@gmail.com>
 
        * include/bits/basic_string.h (getline): Fix doxygen comments.
index 9f423d0e821460b1ed5d232e83df6875e573bab7..5ab8945a474f59bdb24e7c6ef9c498eef799047e 100644 (file)
@@ -518,14 +518,21 @@ 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 * const _ZTIe[2]
-  = { (void *) &_ZTVN10__cxxabiv123__fundamental_type_infoE[2],
-      (void *) _ZTSe };
+  = { reinterpret_cast<const void *>
+      (&_ZTVN10__cxxabiv123__fundamental_type_infoE[2]),
+      reinterpret_cast<const void *>(_ZTSe) };
 extern __attribute__((used, weak)) const void * const _ZTIPe[4]
-  = { (void *) &_ZTVN10__cxxabiv119__pointer_type_infoE[2],
-      (void *) _ZTSPe, (void *) 0L, (void *) _ZTIe };
+  = { reinterpret_cast<const void *>
+      (&_ZTVN10__cxxabiv119__pointer_type_infoE[2]),
+      reinterpret_cast<const void *>(_ZTSPe),
+      reinterpret_cast<const void *>(0L),
+      reinterpret_cast<const void *>(_ZTIe) };
 extern __attribute__((used, weak)) const void * const _ZTIPKe[4]
-  = { (void *) &_ZTVN10__cxxabiv119__pointer_type_infoE[2],
-      (void *) _ZTSPKe, (void *) 1L, (void *) _ZTIe };
+  = { reinterpret_cast<const void *>
+      (&_ZTVN10__cxxabiv119__pointer_type_infoE[2]),
+      reinterpret_cast<const void *>(_ZTSPKe),
+      reinterpret_cast<const void *>(1L),
+      reinterpret_cast<const void *>(_ZTIe) };
 #endif // _GLIBCXX_LONG_DOUBLE_COMPAT
 
 #ifdef _GLIBCXX_SYMVER_DARWIN