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.