[PATCH][_GLIBCXX_DEBUG] Improve valid_range check

Jonathan Wakely jwakely@redhat.com
Wed Nov 27 11:19:00 GMT 2019


On 27/11/19 06:37 +0100, François Dumont wrote:
>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 ?

No, I mean CXXFLAGS.

>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.

Ah, it works if you run it *inside* the $target/libstdc++-v3/testsuite
directory. I usually run the tests from the parent directory.


>>
>>>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 !

Just look in testsuite/Makefile to see what variables are used by the
check-debug target. That's what determines the flags used, not my
email! :-)

>>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