This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] float128: Extend __MATH_TG for float128 support


On Mon, 15 May 2017, Gabriel F. T. Gomes wrote:

> +#elif __HAVE_DISTINCT_FLOAT128
> +# if __USE_ISOC11
> +#  define __MATH_TG(TG_ARG, FUNC, ARGS)		\
> +     _Generic ((TG_ARG),			\
> +	       float: FUNC ## f ARGS,		\
> +	       default: FUNC ARGS,		\
> +	       long double: FUNC ## l ARGS,	\
> +	       _Float128: FUNC ## f128 ARGS)

__USE_ISOC11 is about whether to declare library functions etc. from C11; 
it's nothing to do with whether there's compiler support for C11.  
Something like

__GNUC_PREREQ (4, 9) || (!defined __GNUC__ && defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L)

would be more appropriate (or use that to define a macro in sys/cdefs.h 
for whether _Generic is available).

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]