cplusplus / CWG

Core Working Group
23 stars 7 forks source link

[cpp.pragma] The effects of `STDC` pragmas #563

Closed frederick-vs-ja closed 1 week ago

frederick-vs-ja commented 1 week ago

Full name of submitter (unless configured in github; will be published with the issue): Jiang An

Reference (section label): [cpp.pragma]

Link to reflector thread (if any):

Issue description:

Currently, it is implementation-defined whether STDC pragmas are supported, and the effects of such a pragma is only mentioned in a note in [cfenv.syn].

The status quo seems allowing implementations to have STDC pragmas supported with effects different from those in C. Should we require that a pragma specified in the C standard (FP_CONTRACT, FENV_ACCESS, and CX_LIMITED_RANGE added in C99; FENV_ROUND and FENV_DEC_ROUND added in C23) is either ignored or has the same effects as in C?

Suggested resolution:

jensmaurer commented 1 week ago

That might be useful. Maybe those pragmas should even be conditionally-supported.

This feels like a new feature, not a core issue, and thus needs a paper targeted at EWG.