[Cfp-interest 2468] Re: Likely upcoming work for CFP from WG14'smeeting today

Jim Thomas jaswthomas at sbcglobal.net
Thu Jul 21 20:22:30 PDT 2022


I agree. Maybe add “If E has decimal floating type, the added 1 has quantum exponent 0.”

- Jim Thomas

> On Jul 21, 2022, at 10:18 AM, Mike Cowlishaw <mfc at speleotrove.com> wrote:
> 
> If there is confusion, then indeed clarification is justified.  An explicit statement of the quantum exponent makes sense, even if technically it's not necessary.
>  
> Mike
> 
>> From: Cfp-interest [mailto:cfp-interest-bounces at oakapple.net] On Behalf Of Rajan Bhakta
>> Sent: 21 July 2022 18:06
>> To: cfp-interest at oakapple.net
>> Subject: [Cfp-interest 2466] Likely upcoming work for CFP from WG14'smeeting today
>> 
>> 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
> _______________________________________________
> 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/20220721/1c248af7/attachment.htm>


More information about the Cfp-interest mailing list