[Cfp-interest 2087] Re: Freestanding with FP binding

Jim Thomas jaswthomas at sbcglobal.net
Fri Aug 6 09:58:26 PDT 2021



> On Aug 5, 2021, at 12:18 PM, Rajan Bhakta <rbhakta at us.ibm.com> wrote:
> 
> Looking at the specification, I think the only thing that really works is to do something like the following:
> 1) Say for freestanding that error conditions do not necessarily have to be handled (including setting errno). This would have the new side effect of not requiring using exceptions as well.
> or
> 2) Change the strtod family of functions to allow exceptions to be used for error reporting instead of just errno. This would be a change to the general C standard, but likely more palatable.
> 

I think 2) would be straightforward, following 7.12.1 #5 and #6, introducing stdilb_errhandling, STDLIB_ERRNO, and STDLIB_ERREXCEPT. We’d need to insert in F.5: "The expression stdlib_errhandling & STDLIB_ERREXCEPT shall evaluate to a nonzero value.”

- Jim Thomas
> 
> With regards to the whitespace and decimal point scanning, as long as we allow a freestanding implementation to have just the C locale (as it is now) and a single fixed code page, I think it would work for freestanding. The issues described in WG14 19444 still apply however meaning the code is not necessarily portable, but this may be something we either accept, or mandate that the C locale must be used.
> 
> Regards,
> 
> Rajan Bhakta
> z/OS XL C/C++ Compiler Technical Architect
> ISO C Standards Representative (Canada, USA), PL22.11 Chair
> C/C++ Compiler Development
> rbhakta at us.ibm.com
> 
> IBM
> 
> _______________________________________________
> Cfp-interest mailing list
> Cfp-interest at oakapple.net
> http://mailman.oakapple.net/mailman/listinfo/cfp-interest

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


More information about the Cfp-interest mailing list