Re: [RFC] Turning off trapping-math for C and C++ front-ends by default
Project / Subsystem
gcc / gcc
Date
2026-07-02
Proposer
Richard Biener <rguenther@suse.de>
Source type
public_inbox
Consensus
Proposed
Sentiment
6/10
Technical tradeoffs
- • Disabling FPU traps by default simplifies compiler optimizations but may require explicit enabling for code that relies on trap behavior.
- • Standardizing FPU exception control via flags like `-ffp-exceptions` aims for clarity but requires careful definition of each level.
All attributes
- project
- gcc
- subsystem
- gcc
- patch_id
- —
- discussion_id
- a3e960ff-0bc8-a13f-19ad-f0d0bd551746@redhat.com
- source_type
- public_inbox
- title
- Re: [RFC] Turning off trapping-math for C and C++ front-ends by default
- headline
- Turning off trapping-math for C and C++ front-ends by default
- tldr
- GCC proposal to disable floating-point exception trapping by default for C/C++ to simplify exception handling.
- proposer
- Richard Biener <rguenther@suse.de>
- consensus
- Proposed
- outcome
- proposed
- sentiment_score
- 6
- technical_tradeoffs
-
- • Disabling FPU traps by default simplifies compiler optimizations but may require explicit enabling for code that relies on trap behavior.
- • Standardizing FPU exception control via flags like `-ffp-exceptions` aims for clarity but requires careful definition of each level.
- series_id
- —
- series_role
- standalone
- series_parts
- []
- tags
-
- • GCC
- • floating-point
- • exceptions
- • compilation
- bugzilla_url
- —
- date
- 2026-07-02T00:00:00.000Z
Re: [RFC] Turning off trapping-math for C and C++ front-ends by default
Richard Biener proposes disabling floating-point exception trapping by default in GCC’s C and C++ front-ends. The goal is to simplify exception handling, as trapping can complicate transformations. Joseph Myers questions the grouping of ‘ieee’ and ‘ieee-alternate’ under a single option, suggesting they encompass a wide range of restrictions. Biener seeks an alternative suggestion that isolates trap-based exceptions.