This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Provide a C++ version of iseqsig
- From: Joseph Myers <joseph at codesourcery dot com>
- To: "Gabriel F. T. Gomes" <gabriel at inconstante dot eti dot br>
- Cc: <libc-alpha at sourceware dot org>
- Date: Fri, 3 Nov 2017 16:13:04 +0000
- Subject: Re: [PATCH] Provide a C++ version of iseqsig
- Authentication-results: sourceware.org; auth=none
- References: <20171103131604.14412-1-gabriel@inconstante.eti.br>
On Fri, 3 Nov 2017, Gabriel F. T. Gomes wrote:
> +__iseqsig_type (float fmt, __T1 x, __T2 y)
As noted, namespace requirements mean it should be __fmt, __x, __y.
> + __iseqsig_type (__MATH_EVAL_FMT2 (x, y), x, y)
As far as I can tell, __MATH_EVAL_FMT2 (x, y) *does* get evaluated (with
consequent floating-point exceptions), just the value of that function
argument isn't used. I'd think something like
(__typeof (__MATH_EVAL_FMT2 (x, y)) 0)
(adjust to use C++ features as appropriate) would be better to ensure no
evaluation.
--
Joseph S. Myers
joseph@codesourcery.com