public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "qiu.chaofan at outlook dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/100912] powerpc64le: ieee128 long double incorrectly printed when using shared libstdc++
Date: Mon, 06 Dec 2021 06:26:02 +0000	[thread overview]
Message-ID: <bug-100912-4-nqg2jawF1k@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-100912-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #9 from Qiu Chaofan <qiu.chaofan at outlook dot com> ---
I also get following 'symbol not found' error for following case (under
-mabi=ieeelongdouble): undefined reference to
`std::__gnu_cxx11_ieee128::money_get<wchar_t, std::istreambuf_iterator<wchar_t,
std::char_traits<wchar_t> > >::money_get(unsigned long)'

Maybe related?

#include <iterator>
#include <locale>
#include <sstream>

struct D : public std::money_get<wchar_t> {
  D() : std::money_get<wchar_t>() {}
  iter_type do_get(iter_type s, iter_type end, bool intl, std::ios_base &str,
                   std::ios_base::iostate &err, long double &units) const {
    return std::money_get<wchar_t>::do_get(s, end, intl, str, err, units);
  }
} d;

int main(void) {
  std::wistringstream in(L"1 ");
  in.imbue(std::locale::classic());
  in.exceptions(std::ios_base::goodbit);

  long double val;
  std::istreambuf_iterator<wchar_t> end;
  std::istreambuf_iterator<wchar_t> begin(in);
  std::ios_base::iostate prior_err = in.rdstate();
  std::ios_base::iostate err = in.rdstate();
  d.do_get(begin, end, true, in, err, val);

  return 0;
}

  parent reply	other threads:[~2021-12-06  6:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-04 18:51 [Bug libstdc++/100912] New: " msc at linux dot ibm.com
2021-06-04 22:27 ` [Bug target/100912] " pinskia at gcc dot gnu.org
2021-06-05 10:51 ` redi at gcc dot gnu.org
2021-06-07 13:27 ` msc at linux dot ibm.com
2021-06-07 13:50 ` msc at linux dot ibm.com
2021-10-11 10:08 ` [Bug libstdc++/100912] " qiu.chaofan at outlook dot com
2021-10-13  8:56 ` qiu.chaofan at outlook dot com
2021-10-13  9:16 ` redi at gcc dot gnu.org
2021-10-21  3:47 ` qiu.chaofan at outlook dot com
2021-12-06  6:26 ` qiu.chaofan at outlook dot com [this message]
2022-01-10  9:57 ` qiu.chaofan at outlook dot com
2022-01-10 10:01 ` redi at gcc dot gnu.org
2022-02-14 17:27 ` cvs-commit at gcc dot gnu.org
2022-02-14 17:29 ` 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-100912-4-nqg2jawF1k@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).