public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pluto at agmk dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/52540] std::use_facet throws bad_cast when compiled with _GLIBCXX_DEBUG
Date: Sun, 11 Mar 2012 19:50:00 -0000	[thread overview]
Message-ID: <bug-52540-4-pWjbmtEeIr@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-52540-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #11 from Pawel Sikora <pluto at agmk dot net> 2012-03-11 19:49:41 UTC ---
(In reply to comment #9)
> Then this is a very old issue, isn't it? Why nobody noticed it before? To be
> clear, in debug-mode we don't use extern templates only for basic_string
> (because _GLIBCXX_EXTERN_TEMPLATE becomes -1 when _GLIBCXX_DEBUG is defined),
> all the other facilities remain the same still use extern tamplate. This is in
> order to enable debug-mode checks also at -O0 for basic_string. Now, I don't
> see why a few less extern template can make a difference on mingw in terms of
> correctness of use_facet or anything else, but if that's really the case due to
> fundamental limitations somehwhere, we can trade it for the -O0 basic_string
> checks on the affected systems, I have no problems with that (note that,
> AFAICS, the problem will not go away with a new C++11 conforming string class,
> unless we decide to not export from the .so parts of basic_string)

i'm not sure the problem is in std::string details. in the debug-mode
the use_facet is no more extern template and instantiates in client code,
especially the static facet's field like std::locale::id. is this 'id'
and other static details correctly initialized in (non-extern-template)
debug-mode?


  parent reply	other threads:[~2012-03-11 19:50 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-09 10:56 [Bug libstdc++/52540] New: " pluto at agmk dot net
2012-03-09 11:03 ` [Bug libstdc++/52540] " paolo.carlini at oracle dot com
2012-03-09 11:20 ` ktietz at gcc dot gnu.org
2012-03-09 11:21 ` ktietz at gcc dot gnu.org
2012-03-09 12:00 ` ktietz at gcc dot gnu.org
2012-03-09 12:56 ` paolo.carlini at oracle dot com
2012-03-09 13:01 ` ktietz at gcc dot gnu.org
2012-03-10 13:15 ` pluto at agmk dot net
2012-03-10 13:17 ` pluto at agmk dot net
2012-03-11 11:21 ` paolo.carlini at oracle dot com
2012-03-11 18:36 ` ktietz at gcc dot gnu.org
2012-03-11 19:50 ` pluto at agmk dot net [this message]
2012-03-15 16:23 ` pluto at agmk dot net
2012-03-15 16:37 ` pluto at agmk dot net
2012-03-16 10:12 ` paolo.carlini at oracle dot com
2012-03-16 10:40 ` pluto at agmk dot net
2012-03-19 23:59 ` paolo at gcc dot gnu.org
2012-03-23 11:09 ` paolo at gcc dot gnu.org
2012-03-23 11:33 ` paolo.carlini at oracle dot com

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-52540-4-pWjbmtEeIr@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).