https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80756

--- Comment #4 from Vincent Lefèvre <vincent-gcc at vinc17 dot net> ---
(In reply to nsz from comment #3)
> fabs and fma identifiers are reserved for the implementation and it is valid
> to treat them as constant expression in initializers based on c99 6.6p10

Well, if <math.h> is included, perhaps, but this would need to be documented as
an implementation-defined behavior. The GCC manual Section 4 "C
Implementation-Defined Behavior" doesn't seem to document such constant
expressions and when they are available.

If <math.h> is not included, there should be at least a warning because fabs()
or fma() is used without including the header first, thus potentially yielding
unexpected results and obscure bugs.

Reply via email to