[Cfp-interest 1663] Re: payload missing const

Jim Thomas jaswthomas at sbcglobal.net
Wed Jun 24 14:13:53 PDT 2020



> On Jun 22, 2020, at 1:47 PM, Fred J. Tydeman <tydeman at tybor.com> wrote:
> 
> On Fri, 19 Jun 2020 10:11:01 -0700 (PDT) Fred J. Tydeman wrote:
>> 
>> Missing 'const' in *payload.  Editorial or new paper?  
>> AI: Fred - write paper saying missed.
> 
> Here is the text version.  If this is OK, I will make an HTML version for WG14.
> 
> The binary getpayload functions (WG14 N2478 Annex B.11 and F.10.13.1):
> 
> double getpayload(const double *x);
> float getpayloadf(const float *x);
> long double getpayloadl(const long double *x);
> 
> have 'const' in the parameter.
> 
> While the corresponding decimal functions:
> 
> _Decimal32 getpayloadd32(_Decimal32 *x);
> _Decimal64 getpayloadd64(_Decimal64 *x);
> _Decimal128 getpayloadd128(_Decimal128 *x);
> 
> are missing that 'const'.  This was an oversite by the CFP committee.

N 2341 from CFP has ‘const’ in these interfaces. You could say “This was an oversight.”

- Jim Thomas

> 
> 'const' should be added to the three decimal getpayloaddN functions as:
> 
> _Decimal32 getpayloadd32(const _Decimal32 *x);
> _Decimal64 getpayloadd64(const _Decimal64 *x);
> _Decimal128 getpayloadd128(const _Decimal128 *x);
> 
> 
> ---
> Fred J. Tydeman        Tydeman Consulting
> tydeman at tybor.com      Testing, numerics, programming
> +1 (702) 608-6093      Vice-chair of PL22.11 (ANSI "C")
> Sample C99+FPCE tests: http://www.tybor.com
> Savers sleep well, investors eat well, spenders work forever.
> 
> _______________________________________________
> Cfp-interest mailing list
> Cfp-interest at oakapple.net
> http://mailman.oakapple.net/mailman/listinfo/cfp-interest




More information about the Cfp-interest mailing list