[cfp-interest 3539] Pragmas and headers

Jim Thomas jaswthomas at sbcglobal.net
Sun Jun 29 15:28:54 PDT 2025


This message addresses the CFP action item

>     Jim & Rajan: Investigate the change to decouple pragmas from headers.


A first approach was to move all the standard pragma specifications under 6.10.8. It looked like that would be fine for FP_CONTRACT, but FENV_ROUND and FENV_DEC_ROUND have pages of semantics (including tables), much of it directly related to library features. The move would mean loading up 6.10.8 and entail lots of forward references to the library.

Instead, the approach below is to make clear that use of the pragmas does not require inclusion of the header, while leaving the descriptions of the pragmas in place.  

Suggested changes:

In 6.10.8 #2, change

… whose meanings are described elsewhere: in related library subclauses. Use of standard pragmas does not require inclusion of the header whose subclause contains the description of the pragma.


In 7.12.3	change 

Synapsis

#include <math.h>
#pragma STDD FP_CONTRACT on-off-switch

Description

The FP_CONTRACT pragma can be used  to allow (if the state is "on") or disallow (if the state is "off") the implementation to contract expressions (6.5.1). Use of the pragma does not require inclusion of <math.h>. Each The pragma can occur …

In the subclauses for the other standard pragmas, make similar changes.

- Jim Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20250629/2191b8cd/attachment.htm>


More information about the cfp-interest mailing list