This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [v3] libstdc++/6518
Andreas Schwab wrote:
>I'm talking about an string of length 0, not a null pointer. I cannot
>find anything in the standard that requires badbit being set when an empty
>string is passed to operator<<.
>
IMHO, this is a very good point: the /real/ reason why this commit is
becoming quite controversial is that the bad bit is set not only upon a
null pointer but also upon a zero length string: unfortunately the hunks
which now set the badbit work in terms of __len and therefore are not
able to tell the former situation from the latter!
Ciao, Paolo.