]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Simplify __throw_out_of_range_fmt for freestanding
authorJonathan Wakely <jwakely@redhat.com>
Thu, 20 May 2021 17:13:00 +0000 (18:13 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 1 Oct 2021 19:36:54 +0000 (20:36 +0100)
commit44967af830a8d887f0d7b6848d40e1c0870b6b0e
treeeee27696cc2b8f474e2d37c3198e60e040980f1b
parentdc1b29508d765b874372f4b1737ac6dc86962506
libstdc++: Simplify __throw_out_of_range_fmt for freestanding

There is no point expanding the format string if we're just going to
abort instead of throw an exception. And for freestanding or non-verbose
builds we shouldn't do it either, to reduce the binary size.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

* src/c++11/functexcept.cc (__throw_out_of_range_fmt): Do not
expand the format string for freestanding, or non-vebose, or if
we're just going to abort anyway.
* src/c++11/snprintf_lite.cc: Remove unused header and
declaration.
libstdc++-v3/src/c++11/functexcept.cc
libstdc++-v3/src/c++11/snprintf_lite.cc