[Cfp-interest] DFP: Mixed types

Jim Thomas jaswthomas at sbcglobal.net
Tue Dec 4 20:55:04 PST 2012


On Dec 4, 2012, at 5:54 PM, Fred J. Tydeman wrote:

> 9.4 Usual arithmetic conversions, 11.1 Operators, p. 26 7.12.14#1
> Comparison macros
>  If generic FP is decimal FP, then it seems like we should allow
> "mixed" types for conversions and operations.  For example:
> 
>  If FLT_RADIX is not 10 and one operand is a decimal floating type, all
>  other operands shall not be generic floating type, complex type, or
>  imaginary type:
> 
> Unless we want to make sure that the code is portable to
> implementations where generic FP is non-decimal FP.

I believe with what we have now an implementation for which generic and decimal floating point were the same could allow mixing types, though would have to issue diagnostics for the constraint violations. The diagnostic messages could note the non-portability. And diagnostics would be required only under translation options that implied conformance.

-Jim

> 
> 
> ---
> Fred J. Tydeman        Tydeman Consulting
> tydeman at tybor.com      Testing, numerics, programming
> +1 (775) 287-5904      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