Review debug message generation

François Dumont frs.dumont@gmail.com
Wed Nov 9 21:37:00 GMT 2016


Hi

     Here is a proposal to review how we generate the debug output in 
case of assertion failure. It removes usage of format_word which, as a 
side effect will fix PR 77459. Should I reference this PR in the ChangeLog ?

     I introduced a print_literal function to avoid using strlen on 
them. I know that gcc optimizes calls to strlen on literals but in our 
case we were not directly calling it on the literals.

     Tested under Linux x86_64, ok to commit ?

     * src/c++11/debug.cc (format_word): Delete.
     (print_literal): New. Replace call to print_word for literals.

François


On 08/11/2016 22:35, fdumont at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77459
>
> --- Comment #8 from François Dumont <fdumont at gcc dot gnu.org> ---
> Ok, at least it confirms what I thought about builtins. So the problem is
> rather a buggy target.
>
> Even if so I'll try to find an alternative approach to avoid snprintf usage.
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: debug.cc.patch
Type: text/x-patch
Size: 6185 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20161109/f69cc7f9/attachment.bin>


More information about the Libstdc++ mailing list