[Bug c++/79009] Missing 'inconsistent deduction for ‘auto’' error when having a dependent initializer and a nondependent one in the same declaration

2024-08-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79009

Andrew Pinski  changed:

   What|Removed |Added

 CC||iamkirkezz at gmail dot com

--- Comment #10 from Andrew Pinski  ---
*** Bug 116446 has been marked as a duplicate of this bug. ***

[Bug c++/79009] Missing 'inconsistent deduction for ‘auto’' error when having a dependent initializer and a nondependent one in the same declaration

2024-08-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79009

Andrew Pinski  changed:

   What|Removed |Added

 CC||haining.cpp at gmail dot com

--- Comment #9 from Andrew Pinski  ---
*** Bug 79624 has been marked as a duplicate of this bug. ***

[Bug c++/79009] Missing 'inconsistent deduction for ‘auto’' error when having a dependent initializer and a nondependent one in the same declaration

2024-08-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79009

Andrew Pinski  changed:

   What|Removed |Added

 CC||delacroix777 at proton dot me

--- Comment #8 from Andrew Pinski  ---
*** Bug 116368 has been marked as a duplicate of this bug. ***

[Bug c++/79009] Missing 'inconsistent deduction for ‘auto’' error when having a dependent initializer and a nondependent one in the same declaration

2021-02-01 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79009

Jonathan Wakely  changed:

   What|Removed |Added

 CC||stephan.oostveen@nextlevel-
   ||electronics.com

--- Comment #7 from Jonathan Wakely  ---
*** Bug 98919 has been marked as a duplicate of this bug. ***

[Bug c++/79009] Missing 'inconsistent deduction for ‘auto’' error when having a dependent initializer and a nondependent one in the same declaration

2019-11-14 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79009

Jonathan Wakely  changed:

   What|Removed |Added

 CC||g...@nicholas-schwab.de

--- Comment #6 from Jonathan Wakely  ---
*** Bug 92509 has been marked as a duplicate of this bug. ***

[Bug c++/79009] Missing 'inconsistent deduction for ‘auto’' error when having a dependent initializer and a nondependent one in the same declaration

2018-06-18 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79009

Jonathan Wakely  changed:

   What|Removed |Added

 CC||zhonghao at pku dot org.cn

--- Comment #5 from Jonathan Wakely  ---
*** Bug 86185 has been marked as a duplicate of this bug. ***

[Bug c++/79009] Missing 'inconsistent deduction for ‘auto’' error when having a dependent initializer and a nondependent one in the same declaration

2018-04-16 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79009

Jonathan Wakely  changed:

   What|Removed |Added

 CC||gcc at abeckmann dot de

--- Comment #4 from Jonathan Wakely  ---
*** Bug 59960 has been marked as a duplicate of this bug. ***

[Bug c++/79009] Missing 'inconsistent deduction for ‘auto’' error when having a dependent initializer and a nondependent one in the same declaration

2018-04-16 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79009

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-04-16
 Ever confirmed|0   |1

--- Comment #3 from Jonathan Wakely  ---
Confirmed. Clang rejects the original with:

auto.cc:5:3: error: 'auto' deduced as 'long' in declaration of 'i' and deduced
as 'int' in declaration of 'j'
  auto i = t, j = 1;
  ^~  ~
auto.cc:25:3: note: in instantiation of function template specialization
'foo' requested here
  foo (0L);
  ^
auto.cc:12:3: error: 'auto' deduced as 'int' in declaration of 'i' and deduced
as 'long' in declaration of 'j'
  auto i = 1, j = t, k = 2;
  ^~  ~
auto.cc:26:3: note: in instantiation of function template specialization
'bar' requested here
  bar (0L);
  ^
auto.cc:19:3: error: 'auto' deduced as 'int' in declaration of 'i' and deduced
as 'long' in declaration of 'j'
  auto i = t, j = u;
  ^~  ~
auto.cc:27:3: note: in instantiation of function template specialization
'foo' requested here
  foo (1, 2L);
  ^
3 errors generated.


And similarly for comment 2:

auto.cc:7:9: error: 'auto' deduced as 'S' in declaration of 's' and
deduced as 'int' in declaration of 'i'
auto s = S(), i = 1;
^~~  ~
auto.cc:11:9: note: in instantiation of function template specialization
'f' requested here
f();
^
1 error generated.

[Bug c++/79009] Missing 'inconsistent deduction for ‘auto’' error when having a dependent initializer and a nondependent one in the same declaration

2018-04-16 Thread sasha2048 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79009

Sasha Unknown  changed:

   What|Removed |Added

 CC||sasha2048 at gmail dot com

--- Comment #2 from Sasha Unknown  ---
I confirm that this still happens on my g++-7 (Ubuntu 7.2.0-1ubuntu1~16.04)
7.2.0.

My test program (essentially the same as original):

template
struct S {};

template
void f() {
auto s = S(), i = 1;
}

int main() {
f();
return 0;
}

[Bug c++/79009] Missing 'inconsistent deduction for ‘auto’' error when having a dependent initializer and a nondependent one in the same declaration

2017-01-19 Thread martindorey at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79009

Martin Dorey  changed:

   What|Removed |Added

 CC||martindorey at gmail dot com

--- Comment #1 from Martin Dorey  ---
In my testing today, gcc 4.7.2, gcc 6.2.1 and Debian experimental's gcc 7.0.0
20161230, among other versions, reject the one-argument foo and bar
instantiations from the OP's testcase, as I think they should.  They accept the
two-argument foo, I think incorrectly, an accepts-invalid bug.  (clang rejects
all three.)  But the Subject line's use of "nondependent" suggests the OP is
reporting an accepts-invalid error on the one-argument instantiations.  Could
it be that's a regression between 20161230 and 2017-01-05?  I don't feel the
two-argument foo - the bug I can reproduce - is covered by the Subject line. 
That's OK, as:

Bug #59960 - accepts ill-formed 'auto a1 = t1, a2 = t2;' where t1 and t2 have
different template types

... looks to have reported much the same thing, some three years earlier.  It's
unloved by any cc:s and, unlike this PR, has no Depends-on.

[Bug c++/79009] Missing 'inconsistent deduction for ‘auto’' error when having a dependent initializer and a nondependent one in the same declaration

2017-01-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79009
Bug 79009 depends on bug 78693, which changed state.

Bug 78693 Summary: [6 Regression] Bogus 'inconsistent deduction for ‘auto’' 
error when having a dependent initializer and a nondependent one in the same 
declaration
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78693

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED