public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r12-7734] libstdc++: Work around clang misdesign in time_get<>::get [PR104990] Date: Mon, 21 Mar 2022 10:03:27 +0000 (GMT) [thread overview] Message-ID: <20220321100327.BD0D73858C50@sourceware.org> (raw) https://gcc.gnu.org/g:e63ac860afe816fef6b86bee6e47980e1351213c commit r12-7734-ge63ac860afe816fef6b86bee6e47980e1351213c Author: Jakub Jelinek <jakub@redhat.com> Date: Mon Mar 21 11:02:04 2022 +0100 libstdc++: Work around clang misdesign in time_get<>::get [PR104990] Apparently clang has a -fgnuc-version= option which allows it to pretend it is any GCC version the user likes. It is already bad that it claims to be GCC 4.2 compatible by default when it is not (various unimplemented extensions at least), but this option is a horrible idea. Anyway, this patch adds a hack for it. 2022-03-21 Jakub Jelinek <jakub@redhat.com> PR libstdc++/104990 * include/bits/locale_facets_nonio.tcc (get): Don't check if do_get isn't overloaded if __clang__ is defined. Diff: --- libstdc++-v3/include/bits/locale_facets_nonio.tcc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/include/bits/locale_facets_nonio.tcc b/libstdc++-v3/include/bits/locale_facets_nonio.tcc index 8c37a706db8..17a2c8d4486 100644 --- a/libstdc++-v3/include/bits/locale_facets_nonio.tcc +++ b/libstdc++-v3/include/bits/locale_facets_nonio.tcc @@ -1465,7 +1465,7 @@ _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11 ctype<_CharT> const& __ctype = use_facet<ctype<_CharT> >(__loc); __err = ios_base::goodbit; bool __use_state = false; -#if __GNUC__ >= 5 +#if __GNUC__ >= 5 && !defined(__clang__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wpmf-conversions" // Nasty hack. The C++ standard mandates that get invokes the do_get
reply other threads:[~2022-03-21 10:03 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220321100327.BD0D73858C50@sourceware.org \ --to=jakub@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@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: linkBe 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).