public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "foom at fuhm dot net" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/97449] New: libstdc++ <variant> cannot be compiled with clang after 3427e31331677ca826c5588c87924214f7e5c54b Date: Thu, 15 Oct 2020 16:47:31 +0000 [thread overview] Message-ID: <bug-97449-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97449 Bug ID: 97449 Summary: libstdc++ <variant> cannot be compiled with clang after 3427e31331677ca826c5588c87924214f7e5c54b Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: foom at fuhm dot net Target Milestone: --- After 3427e31331677ca826c5588c87924214f7e5c54b, "clang -std=c++17" (using libstdc++ headers), on a file that has simply "#include <variant>" fails with this error: In file included from <source>:1: /opt/compiler-explorer/gcc-snapshot/lib/gcc/x86_64-linux-gnu/11.0.0/../../../../include/c++/11.0.0/variant:1032:10: error: no matching constructor for initialization of 'std::__nonesuch' return __nonesuch{}; ^ ~~ /opt/compiler-explorer/gcc-snapshot/lib/gcc/x86_64-linux-gnu/11.0.0/../../../../include/c++/11.0.0/type_traits:2953:5: note: candidate constructor not viable: requires 1 argument, but 0 were provided __nonesuch(__nonesuch const&) = delete; ^ (https://godbolt.org/z/951jYr) I believe Clang is correct to reject this code, due to http://eel.is/c++draft/temp.res#general-8.1 """ The program is ill-formed, no diagnostic required, if: - no valid specialization can be generated for a template or a substatement of a constexpr if statement within a template and the template is not instantiated """ The invalid return statement probably needs to be made dependent on __visit_ret_type_mismatch just like the static_assert.
next reply other threads:[~2020-10-15 16:47 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-10-15 16:47 foom at fuhm dot net [this message] 2020-10-15 17:06 ` [Bug libstdc++/97449] [11 Regression] " redi at gcc dot gnu.org 2020-10-15 17:06 ` redi at gcc dot gnu.org 2020-10-15 18:36 ` ville.voutilainen at gmail dot com 2020-10-16 6:15 ` rguenth at gcc dot gnu.org 2020-10-16 7:28 ` ville.voutilainen at gmail dot com 2020-10-17 20:11 ` cvs-commit at gcc dot gnu.org 2020-10-17 20:12 ` ville.voutilainen 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-97449-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).