[v3] libstdc++/6518

Paolo Carlini pcarlini@unitus.it
Thu May 23 10:14:00 GMT 2002


Andreas Schwab wrote:

>Err, what about comparing with NULL?
>
(sorry to everyone if this is becoming a C pointers tutorial which 
Andreas is giving to me ;-)

I see.

If you can confirm that this always works, also when NULL is in fact 
coded as a zero, then we got a solution. Simply, check at beginning of 
each ostream<< for __s != NULL, set the badbit and bailout in that case, 
otherwise output the string, possibly only zero chars if __len == 0.

Ciao, Paolo.




More information about the Gcc-patches mailing list