[cfe-dev] Changing semantics of __fp16 (original) (raw)

Steve (Numerics) Canon via cfe-dev cfe-dev at lists.llvm.org
Thu Dec 10 08🔞50 PST 2020


Hi —

Silently changing the semantics of __fp16 (Approach A) so that existing programs suddenly get different (and in many cases, worse) results seems quite problematic to me.

Approach B is also deeply flawed, however, as it violates the ACLE documentation for float16_t:

_If the fp16 type is defined, float16t is defined as an alias for it.

I have a slight preference for approach B, because it only effects people using float16_t, and not users of __fp16, and allows them the escape valve of switching to using __fp16 explicitly if they need the old behavior.

– Steve



More information about the cfe-dev mailing list