public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/103913] New: Several variables declared in one declarator have distinct types
@ 2022-01-05 7:52 fchelnokov at gmail dot com
2022-01-05 15:24 ` [Bug c++/103913] " mpolacek at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: fchelnokov at gmail dot com @ 2022-01-05 7:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103913
Bug ID: 103913
Summary: Several variables declared in one declarator have
distinct types
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: fchelnokov at gmail dot com
Target Milestone: ---
In this program two variables x and y are declared in one declarator with
template type auto-deduction:
```
template <auto = []{}>
struct B {};
[[maybe_unused]] B x, y;
```
Since the deduction results in two distinct types, the program must be rejected
as Clang and MSVC do. Demo: https://gcc.godbolt.org/z/WExh119E8
Related discussion: https://stackoverflow.com/q/70585292/7325599
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/103913] Several variables declared in one declarator have distinct types
2022-01-05 7:52 [Bug c++/103913] New: Several variables declared in one declarator have distinct types fchelnokov at gmail dot com
@ 2022-01-05 15:24 ` mpolacek at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2022-01-05 15:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103913
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
Ever confirmed|0 |1
Last reconfirmed| |2022-01-05
Status|UNCONFIRMED |NEW
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-05 15:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-05 7:52 [Bug c++/103913] New: Several variables declared in one declarator have distinct types fchelnokov at gmail dot com
2022-01-05 15:24 ` [Bug c++/103913] " mpolacek at gcc dot gnu.org
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).