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 v2] Provide a C++ version of iseqsig


On Wed, 8 Nov 2017, Gabriel F. T. Gomes wrote:

> While adding the added testcase, I noticed a different problem (which
> affects powerpc64le but not x86_64) in the C version of iseqsig
> (it will affect this C++ version of iseqsig, as well, since the problem
> is in the use of __MATH_EVAL_FMT2, as described below).
> 
> GCC target powerpc64le forbids the use of long double (__ibm128) and
> __float128 in the same expression.  Hence, when iseqsig is called with
> these arguments, the expansion in __MATH_EVAL_FMT2 fails with:
> 
> error: __float128 and long double cannot be used in the same expression
> 
> I described this in a new bug report.

As noted in that bug, I think this is probably a defect in TS 18661-3 that 
it fails to apply the same restrictions to comparison macros (in the case 
of types with the same radix but neither's set of values a subset of the 
other) as apply to comparison operators such as == (where a comparison 
between _Float128 and long double is undefined behavior in that case and 
so such a diagnostic is appropriate and permitted).

> +  static int __call(float __x, float __y) throw()

Notwithstanding that this is C++, I'd expect the normal GNU-style space 
before '(' here and in the other template definitions in this header.

Otherwise this seems fine to me but I think it could do with review by a 
C++ expert.

-- 
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]