[cfp-interest 3836] Re: Annex H.13#4
Jim Thomas
jaswthomas at sbcglobal.net
Sat Mar 28 07:46:01 PDT 2026
> On Mar 24, 2026, at 2:06 PM, Damian McGuckin <damianm at esi.com.au> wrote:
>
>
> Use of the macros carg, cimag, conj, cproj, or creal with any
> argument of standard floating type, binary floating type, or
> complex type invokes a complex function. Use of the macro with an
> argument of a decimal floating type results in undefined behavior
>
> Why does the C standard mandate a function be called?
Annex H extends the specification in the main standard where all the tgmath macros invoke functions.
> It seems overly
> restrictive.
How?
>
> Also, I would prefer the second sentence say
>
> The use of a macro with a decimal floating type argument is
> undefined behavior,
> OR
> The use of a macro with an argument of decimal floating type is
> undefined behavior,
>
> because the currently might be confused with the concept of "decimal floating
> type result".
The standard has no instances of “is undefined behavior”. It says “results in undefined behavior” in various contexts. Use of the macro is not undefined behavior per se.
- Jim Thomas
>
> Thanks - Damian
> _______________________________________________
> 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