https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78693
Bug ID: 78693 Summary: [6/7 Regression] Bogus 'inconsistent deduction for ‘auto’' error when having a dependent initializer and a nondependent one in the same declaration Product: gcc Version: 7.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: rs2740 at gmail dot com Target Milestone: --- template<class T> void foo (T t) { auto i = t, j = 1; } prog.cc: In function 'void foo(T)': prog.cc:3:3: error: inconsistent deduction for 'auto': 'auto' and then 'int' auto i = t, j = 1; ^~~~ Accepted by GCC 5.3, Clang, MSVC (CL 19 on gcc.beta.godbolt.org, whatever that corresponds to) and ICC 17 (but with a bogus warning). Rejected by 6.1 and 7 (on Wandbox).