[Cfp-interest 2832] Re: CFP review of TS-4 revisions

Jim Thomas jaswthomas at sbcglobal.net
Sun Aug 20 15:24:04 PDT 2023



> On Aug 20, 2023, at 11:13 AM, Fred J. Tydeman <tydeman at tybor.com> wrote:
> 
> On Sun, 20 Aug 2023 10:51:31 -0700 Jim Thomas wrote:
>> 
>>> 5.1 page 2, line 6:  Is there a problem with freestanding
>>> implementations and <math.h> and trying to access the FP exception
>>> flags? [C23 4.0 Conformance, paragraph 7]
>> Is this a question about the TS or C? According to C23 4 #7 a strictly conforming program that defines __STDC_IEC_60559_BFP__ or __STDC_IEC_60559_DFP__ can't access exception flags because it can't set the FENV_ACCESS state to "on".

Sorry. I didn’t say that correctly. A strictly conforming program that shall be accepted by a freestanding implementation that defines __STDC_IEC_60559_BFP__ or __STDC_IEC_60559_DFP__ can't access exception flags because it can't set the FENV_ACCESS state to “on".
> 
> Should we add words to the TS in 5.1 to mention that access to the FP flags
> may not be provided (so full conformance to the TS would not happen),

If a statement like that is needed, I don’t think the TS is the place for it. The restriction (and license to use the functions at all) applies generally to functions whose exception behavior is covered by Annex F. Our list for the next revision of C might include an item to consider adding in Annex F clarification that freestanding implementations that define __STDC_IEC_60559_BFP__ or __STDC_IEC_60559_DFP__ might not provide the floating-point exceptions feature required by IEC 60559.

It might be helpful to change the 5.1 section in both TSes from:

The specification in C23 allows …

to:

The specification in C23 clause 2 allows …

- Jim Thomas

> 
>>> 6.0 page 3, line 8:  Why "may" for SNaN?
>> Annex F doesn't require support for signaling NaNs. The TSes don't add a stricter requirement here.
> 
> Yes and no.  The *_SNAN macros are required to be supported.
> But, FULL support is not required by C23 F.2.1#3.
> 
> Otherwise, I agree with your comments.
> 
> ---
> Fred J. Tydeman        Tydeman Consulting
> tydeman at tybor.com      Testing, numerics, programming
> +1 (702) 608-6093      Vice-chair of INCITS/C (ANSI "C")
> Sample C17+FPCE tests: http://www.tybor.com
> Savers sleep well, investors eat well, spenders work forever.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20230820/ffaf2995/attachment.htm>


More information about the Cfp-interest mailing list