+++ /dev/null
-// Specific definitions for generic platforms -*- C++ -*-
-
-// Copyright (C) 2015-2026 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// Under Section 7 of GPL version 3, you are granted additional
-// permissions described in the GCC Runtime Library Exception, version
-// 3.1, as published by the Free Software Foundation.
-
-// You should have received a copy of the GNU General Public License and
-// a copy of the GCC Runtime Library Exception along with this program;
-// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
-// <http://www.gnu.org/licenses/>.
-
-/** @file bits/cpu_defines.h
- * This is an internal header file, included by other library headers.
- * Do not attempt to use it directly. @headername{iosfwd}
- */
-
-#ifndef _GLIBCXX_CPU_DEFINES
-#define _GLIBCXX_CPU_DEFINES 1
-
-// Integer divide instructions don't trap on ARM.
-#ifdef __ARM_ARCH_EXT_IDIV__
-#define __glibcxx_integral_traps false
-#else
-#define __glibcxx_integral_traps true
-#endif
-
-#endif
+++ /dev/null
-// Specific definitions for generic platforms -*- C++ -*-
-
-// Copyright (C) 2005-2026 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// Under Section 7 of GPL version 3, you are granted additional
-// permissions described in the GCC Runtime Library Exception, version
-// 3.1, as published by the Free Software Foundation.
-
-// You should have received a copy of the GNU General Public License and
-// a copy of the GCC Runtime Library Exception along with this program;
-// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
-// <http://www.gnu.org/licenses/>.
-
-/** @file bits/cpu_defines.h
- * This is an internal header file, included by other library headers.
- * Do not attempt to use it directly. @headername{iosfwd}
- */
-
-#ifndef _GLIBCXX_CPU_DEFINES
-#define _GLIBCXX_CPU_DEFINES 1
-
-// Integer divide instructions don't trap on PowerPC.
-#define __glibcxx_integral_traps false
-
-#endif
amdgcn)
cpu_defines_dir=cpu/gcn
;;
- arm*)
- cpu_defines_dir=cpu/arm
- ;;
nvptx)
cpu_defines_dir=cpu/nvptx
;;
- powerpc* | rs6000)
- cpu_defines_dir=cpu/powerpc
- ;;
esac
// The default values are appropriate for many 32-bit targets.
// GCC only intrinsically supports modulo integral types. The only remaining
-// integral exceptional values is division by zero. Only targets that do not
-// signal division by zero in some "hard to ignore" way should use false.
+// integral exceptional values is division by zero, but that's an operation,
+// not a value, and traps is about values that trap (Issue554), so there aren't
+// any for integral types. The standard has numeric_limits<bool>::traps
+// explicitly set to false. However, we used to set them all to true based on
+// the division-by-zero misinterpretation, so we retain this macro, and those
+// who relied on the misinterpretation can restore it with a command-line
+// define and revert the ABI-changing effects of this fix.
#ifndef __glibcxx_integral_traps
-# define __glibcxx_integral_traps true
+# define __glibcxx_integral_traps false
#endif
// float
static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
- // It is not clear what it means for a boolean type to trap.
- // This is a DR on the LWG issue list. Here, I use integer
- // promotion semantics.
static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
static _GLIBCXX_USE_CONSTEXPR float_round_style round_style