public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dave at hiauly1 dot hia dot nrc dot ca" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/31836] [4.3 Regression] FAIL: 27_io/basic_istream/extractors_arithmetic/char/12.cc execution test
Date: Sat, 12 May 2007 18:54:00 -0000	[thread overview]
Message-ID: <20070512185410.8879.qmail@sourceware.org> (raw)
In-Reply-To: <bug-31836-276@http.gcc.gnu.org/bugzilla/>



------- Comment #30 from dave at hiauly1 dot hia dot nrc dot ca  2007-05-12 19:54 -------
Subject: Re:  [4.3 Regression] FAIL:
27_io/basic_istream/extractors_arithmetic/char/12.cc execution test

> Ok, Dave, thanks for the details. Let's go for a configure check, I'll work on
> it.

At the moment, I'm investigating a fix along the lines suggested in
comment #26.  The implementation of strtold in HP-UX 11.11 and earlier
is broken in at least four ways:

1) Return of plus or minus _LDBL_MAX instead of HUGE_VALL if correct
   value would cause overflow,
2) locale support is worse than for sscanf,
3) it is listed by HP as not being thread safe,
4) it doesn't support "inf", "infinite" and "nan" conversions.

As a result of 1, we would have to check errno if we are going to
use strtold.  This is likely not thread safe.  Thus, it looks better
to use sscanf.  I checked.  It returns 0 if the result would cause
overflow.  Is there any reason not to sscanf other than performance?

I sent mail to Steve Ellcey asking him to check the behavior of
strtold in HP-UX 11.23 and 11.31.  If there aren't good technical
reasons to favor strtold over sscanf, I think we had best go for
consistency on all versions of HP-UX.  In that case, we wouldn't
need the configure check.

I see that at one time we used _GLIBCXX_USE_C99 instead of
_GLIBCXX_HAVE_STRTOLD.  However, this caused a problem on mips.

Dave


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31836


  parent reply	other threads:[~2007-05-12 18:54 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-05  1:42 [Bug libstdc++/31836] New: " danglin at gcc dot gnu dot org
2007-05-05 20:11 ` [Bug libstdc++/31836] [4.3 Regression] " pcarlini at suse dot de
2007-05-05 20:12 ` pcarlini at suse dot de
2007-05-05 20:38 ` pcarlini at suse dot de
2007-05-05 21:57 ` pcarlini at suse dot de
2007-05-05 22:03 ` dave at hiauly1 dot hia dot nrc dot ca
2007-05-06  3:01 ` dave at hiauly1 dot hia dot nrc dot ca
2007-05-06  3:02 ` dave at hiauly1 dot hia dot nrc dot ca
2007-05-06  9:16 ` pcarlini at suse dot de
2007-05-06  9:16 ` pcarlini at suse dot de
2007-05-06  9:30 ` pcarlini at suse dot de
2007-05-06 11:51 ` paolo at gcc dot gnu dot org
2007-05-06 11:56 ` pcarlini at suse dot de
2007-05-06 21:35 ` dave at hiauly1 dot hia dot nrc dot ca
2007-05-06 22:08 ` dave at hiauly1 dot hia dot nrc dot ca
2007-05-06 22:59 ` pcarlini at suse dot de
2007-05-06 23:52 ` dave at hiauly1 dot hia dot nrc dot ca
2007-05-07  0:02 ` pcarlini at suse dot de
2007-05-11 16:36 ` amylaar at gcc dot gnu dot org
2007-05-11 17:29 ` pcarlini at suse dot de
2007-05-11 17:32 ` dave at hiauly1 dot hia dot nrc dot ca
2007-05-11 18:02 ` pcarlini at suse dot de
2007-05-11 18:04 ` pcarlini at suse dot de
2007-05-11 18:17 ` pcarlini at suse dot de
2007-05-11 22:38 ` dave at hiauly1 dot hia dot nrc dot ca
2007-05-12  0:22 ` dave at hiauly1 dot hia dot nrc dot ca
2007-05-12  0:51 ` pcarlini at suse dot de
2007-05-12  1:01 ` pcarlini at suse dot de
2007-05-12  1:23 ` dave at hiauly1 dot hia dot nrc dot ca
2007-05-12  1:37 ` dave at hiauly1 dot hia dot nrc dot ca
2007-05-12 18:17 ` pcarlini at suse dot de
2007-05-12 18:54 ` dave at hiauly1 dot hia dot nrc dot ca [this message]
2007-05-12 19:26 ` pcarlini at suse dot de
2007-05-14 15:40 ` amylaar at spamcop dot net
2007-05-14 15:54 ` pcarlini at suse dot de
2007-05-14 18:25 ` amylaar at spamcop dot net
2007-06-30  9:12 ` pinskia at gcc dot gnu dot org
2007-07-25 15:33 ` danglin at gcc dot gnu dot org
2007-07-25 15:36 ` danglin at gcc dot gnu dot 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=20070512185410.8879.qmail@sourceware.org \
    --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).