The function __builtin_signbit should be type-generic so that libraries can
define the standard signbit macro with
"#define signbit(x) __builtin_signbit(x)".
(Mentioned several times before in the context of discussions of the other
type-generic built-in functions, but doesn't seem to be filed in Bugzilla
It's necessary to avoid the type-generic signbit expanding to call a library
function that may not exist, but as all currently supported floating-point
formats do have a sign bit specified in signbit_ro I believe the case
of failing to expand inline can be made into an abort.
That would be interesting indeed.
Date: Tue Aug 18 20:07:57 2015
New Revision: 226990
* builtins.c (expand_builtin_signbit): Add asserts to make sure
we can expand BUILT_IN_SIGNBIT inline.
* builtins.def (BUILT_IN_SIGNBIT): Make type-generic.
* doc/extend.texi: Document the type-generic __builtin_signbit.
* c-common.c (check_builtin_function_arguments): Add check
for BUILT_IN_SIGNBIT argument.
* gcc.dg/builtins-error.c: Add checks for __builtin_signbit.
* gcc.dg/tg-tests.h: Add checks for __builtin_signbit.
Fixed on trunk.