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

Reply via email to