From b5ff10f3adc4e18dd80cbeae34c194c5eec8ba59 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Wed, 14 Aug 2013 16:59:46 +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: r201729 --- libstdc++-v3/ChangeLog | 4 ++-- libstdc++-v3/src/c++98/compatibility.cc | 21 +++++++++++++-------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index a9c006800b4..719763e527c 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,7 +1,7 @@ 2013-08-14 Uros Bizjak - * src/c++98/compatibility.cc (_ZTIe): Use (const cast *) - to avoid -Wcast-qual warnings. + * src/c++98/compatibility.cc (_ZTIe): Use + reinterpret_cast to avoid -Wcast-qual warnings. (_ZTIPe): Ditto. (ZTIPKe): Ditto. diff --git a/libstdc++-v3/src/c++98/compatibility.cc b/libstdc++-v3/src/c++98/compatibility.cc index 0a4e45bbe1c..3f21c581ec1 100644 --- a/libstdc++-v3/src/c++98/compatibility.cc +++ b/libstdc++-v3/src/c++98/compatibility.cc @@ -517,16 +517,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] - = { (const void *) &_ZTVN10__cxxabiv123__fundamental_type_infoE[2], - (const void *) _ZTSe }; + = { reinterpret_cast + (&_ZTVN10__cxxabiv123__fundamental_type_infoE[2]), + reinterpret_cast(_ZTSe) }; extern __attribute__((used, weak)) const void * const _ZTIPe[4] - = { (const void *) &_ZTVN10__cxxabiv119__pointer_type_infoE[2], - (const void *) _ZTSPe, (const void *) 0L, - (const 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] - = { (const void *) &_ZTVN10__cxxabiv119__pointer_type_infoE[2], - (const void *) _ZTSPKe, (const void *) 1L, - (const 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