From 346334d2405c8026f32d4c95d7a04c2bc87f3968 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Wed, 14 Aug 2013 13:27:56 +0200 Subject: compatibility.cc (_ZTIe): Use const_cast to avoid warning. * src/c++98/compatibility.cc (_ZTIe): Use const_cast to avoid warning. (_ZTIPe): Ditto. (ZTIPKe): Ditto. From-SVN: r201723 --- libstdc++-v3/src/c++98/compatibility.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'libstdc++-v3/src') diff --git a/libstdc++-v3/src/c++98/compatibility.cc b/libstdc++-v3/src/c++98/compatibility.cc index d964e89..febce3f 100644 --- a/libstdc++-v3/src/c++98/compatibility.cc +++ b/libstdc++-v3/src/c++98/compatibility.cc @@ -516,15 +516,18 @@ extern void *_ZTVN10__cxxabiv119__pointer_type_infoE[]; 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"; +// const_casts are used to avoid -Wcast-qual warnings extern __attribute__((used, weak)) const void * const _ZTIe[2] = { (void *) &_ZTVN10__cxxabiv123__fundamental_type_infoE[2], - (void *) _ZTSe }; + const_cast(_ZTSe) }; extern __attribute__((used, weak)) const void * const _ZTIPe[4] = { (void *) &_ZTVN10__cxxabiv119__pointer_type_infoE[2], - (void *) _ZTSPe, (void *) 0L, (void *) _ZTIe }; + const_cast(_ZTSPe), (void *) 0L, + const_cast(_ZTIe) }; extern __attribute__((used, weak)) const void * const _ZTIPKe[4] = { (void *) &_ZTVN10__cxxabiv119__pointer_type_infoE[2], - (void *) _ZTSPKe, (void *) 1L, (void *) _ZTIe }; + const_cast(_ZTSPKe), (void *) 1L, + const_cast(_ZTIe) }; #endif // _GLIBCXX_LONG_DOUBLE_COMPAT #ifdef _GLIBCXX_SYMVER_DARWIN -- cgit v1.1