[Cfp-interest 2466] Likely upcoming work for CFP from WG14's meeting today

Rajan Bhakta rbhakta at us.ibm.com
Thu Jul 21 10:05:44 PDT 2022


Hello,

In today’s WG14 meeting the ++(E) quantum exponent issue came up again (that we discussion the March meeting this year).
Given later changes to the C standard wording (for _BitInt I believe) and what was already there for postfix, we will need to revisit this.
Joseph has a suggestion in a chat he sent me, but that of course is not necessarily the only way to resolve this issue.

Here are the comments I got:

For ++E DFP quantum exponent issue:
>From Joseph:
The issue is that the wording now consistently no longer says 1 in program font, it says 1 in appropriate type.

Based on the comment I made:
For the +1 quantum exponent issue, CFP discussed this before (in the March 2022 meeting) and this was our discussion (and conclusion):
  C/C++ defines ++ as adding the value 1 to the operand. For DFP, what is the quantum exponent of that 1?
    Zero is the quantum exponent. This follows from ++E is equivalent to (E)+=1 where the 1 is in program font meaning an int constant. The C conversion from int to decimal gives a preferred quantum exponent of zero. So the rules cover this case already.
    No other result seems to make sense anyways.
    Perhaps say it is adding the integer one instead of using the font in the C text for that ++E to clarify?

  Joseph: Postfix ++ and -- said "appropriate type" all along. Prefix changed for _BitInt, because 1 of type int is inappropriate for _BitInt. 1 of appropriate type i fine for both prefix and postfix *if* an additional explicit statement of quantum exponent is added for the DFP case. (And it should be fine for that to be quantum exponent 0, as if integer 1 were 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20220721/0c837b97/attachment.htm>


More information about the Cfp-interest mailing list