[committed] libstdc++: Replace operator>>(istream&, char*) [LWG 2499]

Martin Sebor msebor@gmail.com
Thu Aug 6 18:45:42 GMT 2020


On 8/6/20 10:00 AM, Jonathan Wakely wrote:
> On 06/08/20 09:17 -0600, Martin Sebor via Libstdc++ wrote:
>> Sorry.  I don't see this exercise as a complete waste of time
>> (but I understand why it feels like that to you).
>>
>> What it highlights is the fact that the warning infrastructure
>> we have in place is far from optimal for C++ in general (with
>> its heavy reliance on ilining and templates) and the standard
>> library in particular (especially with -Wno-system-headers).
>> We should make an effort to do better.
>>
>> Setting aside the effort to clean up the library so that it can
>> be used even with -Wsystem-headers,
> 
> Yeah, it's an ongoing effort.
> 
>> warnings about out of bounds
>> accesses should trigger even with -Wno-system-headers.  If one
>> doesn't I'd tend to view it as a bug.
> 
> I agree. And __attribute__((__warning__(""))) too.

I've opened four bugs to track some of the issues we've discussed:
96502, 96503, and 96505 for the lost attribute effect after
inlining, and 96508 for the system header interaction.  I wasn't
able to reproduce the problem you're having with the attribute
(calling an out-of-line function declared in a system header
does produce a warning) so if you're not completely put off
by your experience so far please take a look at it and see
what I may have missed.

Thanks
Martin

> 
>> I added code to have some
>> trigger despite it but I'm pretty sure there are more places where
>> the middle end needs to do the same gymnastics to enable it.
>>
>> Martin
>>
>>
> 



More information about the Libstdc++ mailing list