Enhance __gnu_debug::string debug assertion
Jonathan Wakely
jwakely@redhat.com
Thu Jul 5 10:16:00 GMT 2018
On 05/07/18 07:28 +0200, François Dumont wrote:
>Â Â Â This patch improves the assertion message generated in 2
>__gnu_debug::string constructors giving the assertion context thanks
>to the __FUNCTION__ macro.
>
>Was:
>
>/home/fdt/dev/gcc/build/x86_64-pc-linux-gnu/libstdc++-v3/include/debug/string:56:
>const _CharT* __gnu_debug::__check_string(const _CharT*, _Integer,
>const char*, unsigned int, const char*) [with _CharT = char; _Integer
>= long unsigned int]: Assertion '__s != 0 || __n == 0' failed.
>XFAIL: 21_strings/basic_string/debug/1_neg.cc execution test
>
>Now:
>
>/home/fdt/dev/gcc/build/x86_64-pc-linux-gnu/libstdc++-v3/include/debug/string:172:
>In function:
>Â Â Â __gnu_debug::basic_string<_CharT, _Traits,
>Â Â Â _Allocator>::basic_string(const _CharT*,
>Â Â Â __gnu_debug::basic_string<_CharT, _Traits, _Allocator>::size_type,
>const
>Â Â Â _Allocator&) [with _CharT = char; _Traits = std::char_traits<char>;
>Â Â Â _Allocator = std::allocator<char>; __gnu_debug::basic_string<_CharT,
>Â Â Â _Traits, _Allocator>::size_type = long unsigned int]
>
>Error: __s != 0 || __n == 0.
>XFAIL: 21_strings/basic_string/debug/1_neg.cc execution test
>
>Â Â Â Tested under Linux x86_64 normal and debug modes.
>
>Â Â Â If not told otherwise I plan to commit the attached patch tomorrow.
Looks good - thanks.
More information about the Libstdc++
mailing list