public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "john at johnmaddock dot co.uk" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/43622] no C++ typeinfo for __float128
Date: Thu, 20 Nov 2014 17:12:00 -0000	[thread overview]
Message-ID: <bug-43622-4-ylbowehoZB@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-43622-4@http.gcc.gnu.org/bugzilla/>

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

John Maddock <john at johnmaddock dot co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |john at johnmaddock dot co.uk

--- Comment #24 from John Maddock <john at johnmaddock dot co.uk> ---
(In reply to joseph@codesourcery.com from comment #23)
> On Tue, 18 Nov 2014, glisse at gcc dot gnu.org wrote:
> 
> > __float128 is still missing a specialization of numeric_limits.
> 
> Fully supporting an extended type (whether floating-point, or one like 
> __int128 that mostly acts like an integer type) includes (as I noted in 
> one of the other past bug reports on such issues, bug 50441 (fixed)) 
> typeinfo, numeric_limits (maybe with associated built-in macros), I/O and 
> mathematical functions in general.
> 
> But you may not want libstdc++ to depend on libquadmath, which may limit 
> what you can support for __float128.  (The ideal would be full C support 
> for the relevant parts of TS 18661 in GCC and glibc, which would give you 
> library support in libc and libm that could then be used from libstdc++ 
> when used with glibc.)
> 
> I think it would be reasonable to define built-in __FLT128_*__ macros for 
> __float128 similar to those defined for other floating-point types (you'd 
> then make quadmath.h use those instead of hardcoding the values directly) 
> - and you could then use those macros in numeric_limits.  That naming is 
> in line with DTS 18661-3 defining e.g. FLT128_MANT_DIG as public names for 
> macros relating to _Float128.

+1 on supporting numeric_limits.

IMO while it would be nice to provide full standard lib support, there are
levels of importance here.  typeinfo was essential because the user cannot add
that support themselves.  numeric_limits and iostream support come next in
importance, and of course std::whatever overloads for the <cmath> functions
would be nice but come lower down I guess.

I understand the desire to limit the dependency on libquadmath - perhaps first
class std lib support should be added to <quadmath.h> rather than <limits>,
<cmath> etc if this is an overarching concern?  That said, implementating
numeric_limits for that type is trivial, and this is obviously a built in type,
not a pure library extension so there is a lot to be said for providing this
support without the need to include additional headers.

While we're opening cans of worms.... intmax_t should clearly be __int128...
just saying!


  parent reply	other threads:[~2014-11-20 17:12 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-43622-4@http.gcc.gnu.org/bugzilla/>
2011-02-24  8:25 ` [Bug libstdc++/43622] no C++ typeinfo for __float128 and __int128 bkoz at gcc dot gnu.org
2011-02-24 16:04 ` joseph at codesourcery dot com
2011-02-24 18:59 ` bkoz at gcc dot gnu.org
2011-02-24 19:06 ` bkoz at gcc dot gnu.org
2011-02-24 19:28 ` bkoz at gcc dot gnu.org
2011-02-24 19:42 ` jakub at gcc dot gnu.org
2011-02-24 20:14 ` bkoz at gcc dot gnu.org
2011-03-25 19:58 ` jakub at gcc dot gnu.org
2011-04-14 15:56 ` planet36 at gmail dot com
2011-04-28 16:15 ` rguenth at gcc dot gnu.org
2011-09-25 15:06 ` paolo.carlini at oracle dot com
2012-10-21 22:06 ` planet36 at gmail dot com
2014-03-02 10:41 ` pbristow at hetp dot u-net.com
2014-03-02 12:15 ` glisse at gcc dot gnu.org
2014-03-02 16:11 ` [Bug libstdc++/43622] no C++ typeinfo for __float128 glisse at gcc dot gnu.org
2014-04-22 16:45 ` glisse at gcc dot gnu.org
2014-04-22 17:06 ` glisse at gcc dot gnu.org
2014-04-22 17:25 ` glisse at gcc dot gnu.org
2014-04-22 17:55 ` glisse at gcc dot gnu.org
2014-11-18 20:21 ` glisse at gcc dot gnu.org
2014-11-18 20:42 ` glisse at gcc dot gnu.org
2014-11-18 23:50 ` joseph at codesourcery dot com
2014-11-20 17:12 ` john at johnmaddock dot co.uk [this message]
2014-11-21 12:18 ` john at johnmaddock dot co.uk
2015-04-04 13:36 ` [Bug libstdc++/43622] Incomplete C++ library support " glisse at gcc dot gnu.org
2021-05-04 12:31 ` rguenth at gcc dot gnu.org
2023-05-16 18:19 ` pinskia at gcc dot gnu.org
2023-05-16 18:47 ` redi at gcc dot gnu.org
2023-05-16 18:49 ` redi at gcc dot gnu.org
2023-05-16 19:33 ` joseph at codesourcery dot com
2023-05-16 19:43 ` redi at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-43622-4-ylbowehoZB@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).