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

--- Comment #12 from Segher Boessenkool <segher at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #10)
> Maybe we could do this instead:
> 
> --- a/gcc/config/rs6000/rs6000-c.cc
> +++ b/gcc/config/rs6000/rs6000-c.cc
> @@ -623,11 +623,13 @@ rs6000_cpu_cpp_builtins (cpp_reader *pfile)
>    if (TARGET_FRSQRTES)
>      builtin_define ("__RSQRTEF__");
>    if (TARGET_FLOAT128_TYPE)
> +    {
>        builtin_define ("__FLOAT128_TYPE__");
> +      if (ieee128_float_type_node)
> +       builtin_define ("__SIZEOF_FLOAT128__=16");
> +    }
>    if (ibm128_float_type_node)
>      builtin_define ("__SIZEOF_IBM128__=16");
> -  if (ieee128_float_type_node)
> -    builtin_define ("__SIZEOF_FLOAT128__=16");
>  #ifdef TARGET_LIBC_PROVIDES_HWCAP_IN_TCB
>    builtin_define ("__BUILTIN_CPU_SUPPORTS__");
>  #endif

But why is ieee128_float_type_node not zero then?  That doesn't make
much sense, so this would just be hiding problems.

> It would be nice to add a test to the testsuite along the lines of:
> 
> /* { dg-do compile } */
> #ifdef __SIZEOF_FLOAT128__
> __float128 f;
> #endif

Sure, if we want this to be a generic macro, that is an excellent idea.  Also
for the other types?

Reply via email to