public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dangelog at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/94590] New: Incorrectly accepts invalid C++11 braced initialisation of double from long double if sizeof(long double)==sizeof(double) Date: Tue, 14 Apr 2020 08:59:34 +0000 [thread overview] Message-ID: <bug-94590-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94590 Bug ID: 94590 Summary: Incorrectly accepts invalid C++11 braced initialisation of double from long double if sizeof(long double)==sizeof(double) Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: dangelog at gmail dot com CC: dangelog at gmail dot com, marc at kdab dot com, unassigned at gcc dot gnu.org Target Milestone: --- +++ This bug was initially created as a clone of Bug #92856 +++ (Sorry, couldn't find a way to reopen _that_ bug, so creating a new one) Hi, When using list-initialization from a long double to double, GCC warns (and rejects the code in SFINAE contexts) only on platforms where sizeof(long double) > sizeof(double). This is OK, and documented. However: on platforms where long double is the same as double, GCC incorrectly accepts the code without emitting warnings, and affecting SFINAE. For instance * On ARM: https://godbolt.org/z/SRg3fr * On X86-64 also passing -mlong-double-64: https://godbolt.org/z/GnRkHC SFINAE contexts are affected as well: https://godbolt.org/z/icMA3k Clang, MSVC reject the code.
next reply other threads:[~2020-04-14 8:59 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-14 8:59 dangelog at gmail dot com [this message] 2020-04-14 10:15 ` [Bug c++/94590] " redi at gcc dot gnu.org 2020-04-15 8:42 ` dangelog at gmail dot com 2020-04-19 17:05 ` mpolacek at gcc dot gnu.org 2020-04-19 17:32 ` mpolacek at gcc dot gnu.org 2020-04-20 19:40 ` mpolacek at gcc dot gnu.org 2020-05-07 18:16 ` cvs-commit at gcc dot gnu.org 2020-05-07 18:18 ` mpolacek at gcc dot gnu.org 2020-05-07 23:35 ` dangelog at gmail 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-94590-4@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: 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).