Landing: eb829c6789c5

Project / Subsystem

gcc / libstdc++

Date

2026-04-29

Author

Alexandre Oliva

Commit

eb829c6789c5aebacc8b96b23d220667fa548d50

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
libstdc++
patch_id
commit_hash
eb829c6789c5aebacc8b96b23d220667fa548d50
source_type
github
headline
Libstdc++: Follow the standard for numeric_limits<bool>::traps
tldr
Libstdc++ now correctly sets `numeric_limits<bool>::traps` to `false`, aligning with the C++ standard.
author
Alexandre Oliva
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • libstdc++
  • numeric_limits
  • bool
  • traps
  • standard compliance
discussion_id_link
bugzilla_pr
date
2026-04-29T00:00:00.000Z

This commit aligns numeric_limits<bool>::traps in libstdc++ with the C++ standard, setting it to false. The previous interpretation incorrectly assumed that traps referred to operations that might trap (like division by zero) on integral types, leading to unintended behavior with the __glibcxx_integral_traps setting. This change defaults __glibcxx_integral_traps to false and removes overrides based on the flawed interpretation. While the __glibcxx_integral_traps option is retained for ABI compatibility and potential future use, the default behavior now aligns more closely with the standard, reducing unexpected trapping behavior.