This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [v3] libstdc++/6518


Paolo Carlini wrote:

> Jakub Jelinek wrote:
>
>> Don't you want to pad it to __out.width() even for << NULL?
>> I think the only change should be:
>>
>>              __out.write(__str, __len);
>>              __out.width(0);
>> -             if (!__len)
>> +             if (!__s)
>>                __out.setstate(ios_base::badbit);
>>
> Yes, I believe this is the easiest fix.
> If you agree (and Benjamin doesn't beat us) I will prepare and test a 
> patch coauthored by me and you.

On second thought, I'm not sure this is the best fix: there is no point 
in padding and trying to write output a NULL pointer. I'm testing a 
patch which moves the check (Jakub's check) at the beginning of each 
operator<<.

Ciao,
Paolo.



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