This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: V3 PATCH: numeric_limits<> support, fix PR/3865


On Mon, Sep 02, 2002 at 02:30:12PM -0600, Roger Sayle wrote:
> http://std.dkuug.dk/JTC1/SC22/WG14/www/docs/n965.htm

Thanks.  Draft or not, it looks good enough to use.

> For my two cents, I support Ulrich that adding __builtin_nan,
> __builtin_qnan, __builtin_snan and __builtin_inf to GCC would be
> a convenient starting print, upon which glibc and libstdc++ could
> portably implement the functionality described in the above draft
> standard.

Actually, looking at all this again, I don't think __builtin_qnan
is appropriate.  C99 7.12.11.2/3 is quite explicit that nan/nanf/nanl
returns a quiet nan if available.

Thus I'll just go with __builtin_nan{,s}{,f,l}.

As for __builtin_inf(), on non-ieee targets, should this be more
like HUGE_VAL (return the largest value possible) or INFINITY
(which results in a diagnostic)?  Perhaps the later, and do go
ahead and supply a __builtin_huge_val() as well?


r~


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