[Cfp-interest 1655] payload missing const

Fred J. Tydeman tydeman at tybor.com
Mon Jun 22 13:47:39 PDT 2020


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.

'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.



More information about the Cfp-interest mailing list