From ad3f54c8b2dff8d8adee02a9d08f7399e8ef9fda Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Sat, 17 Aug 2013 12:23:41 +0200 Subject: [PATCH] compatibility.cc (_ZTIe): Use reinterpret_cast to avoid -Wcast-qual warnings. * src/c++98/compatibility.cc (_ZTIe): Use reinterpret_cast to avoid -Wcast-qual warnings. (_ZTIPe): Ditto. (ZTIPKe): Ditto. From-SVN: r201813 --- libstdc++-v3/ChangeLog | 7 +++++++ libstdc++-v3/src/c++98/compatibility.cc | 19 +++++++++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index bde4f5bf50d8..3c9ad3ddba89 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2013-08-17 Uros Bizjak + + * src/c++98/compatibility.cc (_ZTIe): Use + reinterpret_cast to avoid -Wcast-qual warnings. + (_ZTIPe): Ditto. + (ZTIPKe): Ditto. + 2013-05-15 Jonathan Wakely * include/bits/basic_string.h (getline): Fix doxygen comments. diff --git a/libstdc++-v3/src/c++98/compatibility.cc b/libstdc++-v3/src/c++98/compatibility.cc index 9f423d0e8214..5ab8945a474f 100644 --- a/libstdc++-v3/src/c++98/compatibility.cc +++ b/libstdc++-v3/src/c++98/compatibility.cc @@ -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 + (&_ZTVN10__cxxabiv123__fundamental_type_infoE[2]), + reinterpret_cast(_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 + (&_ZTVN10__cxxabiv119__pointer_type_infoE[2]), + reinterpret_cast(_ZTSPe), + reinterpret_cast(0L), + reinterpret_cast(_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 + (&_ZTVN10__cxxabiv119__pointer_type_infoE[2]), + reinterpret_cast(_ZTSPKe), + reinterpret_cast(1L), + reinterpret_cast(_ZTIe) }; #endif // _GLIBCXX_LONG_DOUBLE_COMPAT #ifdef _GLIBCXX_SYMVER_DARWIN -- 2.47.2