[PATCH][_GLIBCXX_DEBUG] Improve valid_range check

François Dumont frs.dumont@gmail.com
Wed Nov 27 05:37:00 GMT 2019


On 11/26/19 10:52 PM, Jonathan Wakely wrote:
> On 26/11/19 20:07 +0100, François Dumont wrote:
>> Sure, I am about to do so.
>>
>> However I wasn't sure about this syntax before the commit so I had 
>> run the new 2_neg.cc with:
>>
>> make CXXFLAGS=-std=c++98 check-debug
>>
>> and it worked fine and still is !
>
> The testsuite doesn't use CXXFLAGS.
>
Did you mean CPPFLAGS ?

I do see the option added to the compiler call in libstdc++.log file. 
And I used it to build for instance pretty-printers tests in 
_GLIBCXX_DEBUG mode with success.

>
>> I also try -std=gnu++98 and made sure that pch had been updated by 
>> re-building libstdc++ first. I just can't get the expected 
>> compilation error.
>>
>> Maybe I need to rebuild the whole stuff to get an error...
>
> No, you need to pass the right flags so they are used by the
> testsuite. This will do it:
>
> make -C testsuite/  check-debug 
> debug_flags=unix/-D_GLIBCXX_DEBUG/-std=gnu++98/-Wsystem-headers
I'll have to keep your mail to remember it !
>
> But since it only shows up with -Wsystem-headers, there's no point
> trying to test for it.
>
>
Ok, makes sens.

Thanks



More information about the Libstdc++ mailing list