mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 23:25:24 +02:00
There's a comment from 2002 suggesting that numeric_limits<bool>::traps was in a DR, but C++ standards including 11, 17 and 23 explicitly set it to false, presumably in response to issue 184. Issue 554 clarifies that traps is about values that may trap, rather than operations that may trap, so we were wrong in the interpretation about divide-by-zero operations' trapping on integral types that led to __glibcxx_integral_traps's defaulting to true, and some of its overrides. Align numeric_limits<bool>::traps with the standard, default __glibcxx_integral_traps to false, drop the overriders based on the incorrect interpretation, but keep __glibcxx_integral_traps to allow command-line restoring of this ABI fix, and for the admittedly unlikely case of trapping integral values' coming to exist on some architecture. for libstdc++-v3/ChangeLog * include/std/limits (__glibcxx_integral_traps): Set to false. Update comments. (numeric_limits<bool>::traps): Drop comments. * config/cpu/arm/cpu_defines.h: Remove. * config/cpu/powerpc/cpu_defines.h: Likewise. * configure.host (cpu_defines_dir): Adjust.