This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/34680] Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti



------- Comment #4 from manish at flock dot com  2008-01-04 23:47 -------
Building the above as follows:

$ g++ -fno-rtti -Os -o testcase testcase.cpp

Results in:

/usr/include/c++/4.2/bits/locale_facets.tcc: In function ?const _Facet&
std::use_facet(const std::locale&) [with _Facet = std::numpunct<char>]?:
/usr/include/c++/4.2/bits/locale_facets.tcc:193:   instantiated from ?void
std::__numpunct_cache<_CharT>::_M_cache(const std::locale&) [with _CharT =
char]?
/usr/include/c++/4.2/bits/locale_facets.tcc:146:   instantiated from ?const
std::__numpunct_cache<_CharT>* std::__use_cache<std::__numpunct_cache<_CharT>
>::operator()(const std::locale&) const [with _CharT = char]?
/usr/include/c++/4.2/bits/locale_facets.tcc:985:   instantiated from ?_OutIter
std::num_put<_CharT, _OutIter>::_M_insert_int(_OutIter, std::ios_base&, _CharT,
_ValueT) const [with _ValueT = long int, _CharT = char, _OutIter =
std::ostreambuf_iterator<char, std::char_traits<char> >]?
/usr/include/c++/4.2/bits/locale_facets.tcc:1255:   instantiated from ?_OutIter
std::num_put<_CharT, _OutIter>::do_put(_OutIter, std::ios_base&, _CharT, long
int) const [with _CharT = char, _OutIter = std::ostreambuf_iterator<char,
std::char_traits<char> >]?
/usr/include/c++/4.2/bits/locale_facets.h:2345:   instantiated from ?_OutIter
std::num_put<_CharT, _OutIter>::put(_OutIter, std::ios_base&, _CharT, long int)
const [with _CharT = char, _OutIter = std::ostreambuf_iterator<char,
std::char_traits<char> >]?
/usr/include/c++/4.2/bits/ostream.tcc:78:   instantiated from
?std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT,
_Traits>::_M_insert(_ValueT) [with _ValueT = long int, _CharT = char, _Traits =
std::char_traits<char>]?
/usr/include/c++/4.2/bits/ostream.tcc:112:   instantiated from
?std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT,
_Traits>::operator<<(int) [with _CharT = char, _Traits =
std::char_traits<char>]?
testcase.cpp:6:   instantiated from here
/usr/include/c++/4.2/bits/locale_facets.tcc:118: error: ?dynamic_cast? not
permitted with -fno-rtti


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34680


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]