From d6b92b65e837b8643e38cba4ddcfe20899916cf3 Mon Sep 17 00:00:00 2001 From: uros Date: Sat, 17 Aug 2013 10:23:41 +0000 Subject: [PATCH] * src/c++98/compatibility.cc (_ZTIe): Use reinterpret_cast to avoid -Wcast-qual warnings. (_ZTIPe): Ditto. (ZTIPKe): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@201813 138bc75d-0d04-0410-961f-82ee72b054a4 --- 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 bde4f5bf50d..3c9ad3ddba8 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 9f423d0e821..5ab8945a474 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.11.0