This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Undefined behavior in locale_facets.tcc
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Doug Gregor <dgregor at apple dot com>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: 03 Jul 2003 08:55:58 +0200
- Subject: Re: Undefined behavior in locale_facets.tcc
- Organization: Integrable Solutions
- References: <71F075EE-ACD7-11D7-B313-00039354D67A@apple.com>
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