public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/97449] New: libstdc++ <variant> cannot be compiled with clang after 3427e31331677ca826c5588c87924214f7e5c54b
@ 2020-10-15 16:47 foom at fuhm dot net
2020-10-15 17:06 ` [Bug libstdc++/97449] [11 Regression] " redi at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: foom at fuhm dot net @ 2020-10-15 16:47 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libstdc++/97449] [11 Regression] libstdc++ <variant> cannot be compiled with clang after 3427e31331677ca826c5588c87924214f7e5c54b
2020-10-15 16:47 [Bug libstdc++/97449] New: libstdc++ <variant> cannot be compiled with clang after 3427e31331677ca826c5588c87924214f7e5c54b foom at fuhm dot net
@ 2020-10-15 17:06 ` redi at gcc dot gnu.org
2020-10-15 17:06 ` redi at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2020-10-15 17:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97449
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |11.0
Known to fail| |11.0
Summary|libstdc++ <variant> cannot |[11 Regression] libstdc++
|be compiled with clang |<variant> cannot be
|after |compiled with clang after
|3427e31331677ca826c5588c879 |3427e31331677ca826c5588c879
|24214f7e5c54b |24214f7e5c54b
CC| |ville at gcc dot gnu.org
Keywords| |rejects-valid
Known to work| |10.2.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libstdc++/97449] [11 Regression] libstdc++ <variant> cannot be compiled with clang after 3427e31331677ca826c5588c87924214f7e5c54b
2020-10-15 16:47 [Bug libstdc++/97449] New: libstdc++ <variant> cannot be compiled with clang after 3427e31331677ca826c5588c87924214f7e5c54b foom at fuhm dot net
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
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2020-10-15 17:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97449
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2020-10-15
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libstdc++/97449] [11 Regression] libstdc++ <variant> cannot be compiled with clang after 3427e31331677ca826c5588c87924214f7e5c54b
2020-10-15 16:47 [Bug libstdc++/97449] New: libstdc++ <variant> cannot be compiled with clang after 3427e31331677ca826c5588c87924214f7e5c54b foom at fuhm dot net
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
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: ville.voutilainen at gmail dot com @ 2020-10-15 18:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97449
Ville Voutilainen <ville.voutilainen at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |ville.voutilainen at gmail dot com
Assignee|unassigned at gcc dot gnu.org |ville.voutilainen at gmail dot com
--- Comment #1 from Ville Voutilainen <ville.voutilainen at gmail dot com> ---
Mine. I have a patch for it already, doing testing and submission chores...
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libstdc++/97449] [11 Regression] libstdc++ <variant> cannot be compiled with clang after 3427e31331677ca826c5588c87924214f7e5c54b
2020-10-15 16:47 [Bug libstdc++/97449] New: libstdc++ <variant> cannot be compiled with clang after 3427e31331677ca826c5588c87924214f7e5c54b foom at fuhm dot net
` (2 preceding siblings ...)
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
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-10-16 6:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97449
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libstdc++/97449] [11 Regression] libstdc++ <variant> cannot be compiled with clang after 3427e31331677ca826c5588c87924214f7e5c54b
2020-10-15 16:47 [Bug libstdc++/97449] New: libstdc++ <variant> cannot be compiled with clang after 3427e31331677ca826c5588c87924214f7e5c54b foom at fuhm dot net
` (3 preceding siblings ...)
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
6 siblings, 0 replies; 8+ messages in thread
From: ville.voutilainen at gmail dot com @ 2020-10-16 7:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97449
--- Comment #2 from Ville Voutilainen <ville.voutilainen at gmail dot com> ---
Patch available:
https://gcc.gnu.org/pipermail/gcc-patches/2020-October/556323.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libstdc++/97449] [11 Regression] libstdc++ <variant> cannot be compiled with clang after 3427e31331677ca826c5588c87924214f7e5c54b
2020-10-15 16:47 [Bug libstdc++/97449] New: libstdc++ <variant> cannot be compiled with clang after 3427e31331677ca826c5588c87924214f7e5c54b foom at fuhm dot net
` (4 preceding siblings ...)
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
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-10-17 20:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97449
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Ville Voutilainen <ville@gcc.gnu.org>:
https://gcc.gnu.org/g:1f65bf2aa65609c0cd88af1b83191d37d6729f46
commit r11-4024-g1f65bf2aa65609c0cd88af1b83191d37d6729f46
Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Sat Oct 17 22:08:50 2020 +0300
libstdc++: Fix visitor return type diagnostics [PR97449]
libstdc++-v3/ChangeLog:
PR libstdc++/97449
* include/std/variant
(__gen_vtable_impl<>::_S_apply_single_alt):
Diagnose visitor return type mismatches here..
(__gen_vtable_impl</*base case*/>::_S_apply):
..not here.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libstdc++/97449] [11 Regression] libstdc++ <variant> cannot be compiled with clang after 3427e31331677ca826c5588c87924214f7e5c54b
2020-10-15 16:47 [Bug libstdc++/97449] New: libstdc++ <variant> cannot be compiled with clang after 3427e31331677ca826c5588c87924214f7e5c54b foom at fuhm dot net
` (5 preceding siblings ...)
2020-10-17 20:11 ` cvs-commit at gcc dot gnu.org
@ 2020-10-17 20:12 ` ville.voutilainen at gmail dot com
6 siblings, 0 replies; 8+ messages in thread
From: ville.voutilainen at gmail dot com @ 2020-10-17 20:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97449
Ville Voutilainen <ville.voutilainen at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Ville Voutilainen <ville.voutilainen at gmail dot com> ---
Fixed.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-10-17 20:12 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-15 16:47 [Bug libstdc++/97449] New: libstdc++ <variant> cannot be compiled with clang after 3427e31331677ca826c5588c87924214f7e5c54b foom at fuhm dot net
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
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).