On Tue, 24 Oct 2017, Michael Meissner wrote:
> This patch adds a new switch (-fimplicit-math-floatn) that when enabled, it
> will add implicit declarations for copysign, fabs, fma, fmax, fmin, nan, and
> sqrt _Float<N> and _Float<N>X variants. Like the previous patch, it adds fma,
> fmax, fmin, and sqrt builtins to the machine independent built-in support, and
> removed the PowerPC specific __builtin_{sqrt,fma}f128 functions.
I don't see why this new option is needed. My expectation would be to use
DEF_EXT_LIB_BUILTIN, as discussed before (i.e. declare the non-__builtin_*
variants by default, but not if flag_iso).
That they should be declared by default is clear, in line with the normal
principle of enabling GNU extensions by default. That they should not be
declared with existing -std=c11 etc. options is also clear. Sometimes
there may be a use for an option to enable particular features of a TS
(e.g. -fpermitted-flt-eval-methods=ts-18661-3,
-fno-fp-int-builtin-inexact), I just don't see the requirement for it in
this particular case. Of course, if in future TS 18661-3 gets added to
C2x, such built-in functions could be enabled for -std=c2x, subject to any
questions of the circumstances under which their names are reserved if the
relevant feature test macros are not defined.
(There are various issues with the documentation of the new option as
well.)
--
Joseph S. Myers
[email protected]