Undefined behavior in locale_facets.tcc
Gabriel Dos Reis
gdr@integrable-solutions.net
Thu Jul 3 06:59:00 GMT 2003
Doug Gregor <dgregor@apple.com> writes:
[...]
| 2) the libstdc++ istreambuf_iterator dereference operation
| returns traits_type::to_char_type(traits_type::eof()) when the
| iterator is past-the-end. This is an (undocumented) extension;
| 24.5.3/2 says the result is undefined.
|
| The end result is that the code works for our istreambuf_iterators
| because of the extension, but won't necessary work for anything
| else. Is there a policy regarding reliance on libstdc++ extensions
| within libstdc++ code? This is especially important for me because
| under debug mode the standard-specified semantics are checked, so the
| use of the extension causes the debug mode to flag an error. How do we
| want to work around this problem? I/we could:
|
| 1) Rewrite the offending code to not use the extension.
Either rewrite the offending code or decoument the extension and
allow it.
But, please, no more macros.
-- Gaby
More information about the Libstdc++
mailing list