This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

Re: Undefined behavior in locale_facets.tcc


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


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