aboutsummaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2022-04-19 10:20:04 -0400
committerPatrick Palka <ppalka@redhat.com>2022-04-19 10:20:04 -0400
commitcd3964ebd3e94ed0df4ecaadb7fd34e991cec753 (patch)
tree00c3cf8f67d2df5ea7a7d20968921cc85cbf5d4e /libgo
parentfdb3f82fb324c3ddd7464d11c8ea60a98f486a0e (diff)
downloadgcc-cd3964ebd3e94ed0df4ecaadb7fd34e991cec753.zip
gcc-cd3964ebd3e94ed0df4ecaadb7fd34e991cec753.tar.gz
gcc-cd3964ebd3e94ed0df4ecaadb7fd34e991cec753.tar.bz2
libstdc++: Stop defining _GLIBCXX_ASSERTIONS in floating_to_chars.cc
Assertions were originally enabled in the compiled-in floating-point std::to_chars implementation to help shake out any bugs, but they apparently impose a significant performance penalty, most notably for the hex formatting which is around 25% slower with assertions enabled. This seems too high a cost for unconditionally enabling them. The newly added calls to __builtin_unreachable work around the compiler no longer knowing that the set of valid values of 'fmt' is limited (which was previously upheld by an assert). libstdc++-v3/ChangeLog: * src/c++17/floating_to_chars.cc (_GLIBCXX_ASSERTIONS): Don't define. (__floating_to_chars_shortest): Add __builtin_unreachable calls to squelch false-positive -Wmaybe-uninitialized and -Wreturn-type warnings. (__floating_to_chars_precision): Likewise.
Diffstat (limited to 'libgo')
0 files changed, 0 insertions, 0 deletions