[Bug c++/66472] -Wshadow gets confused by using statements in template classes

2021-12-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66472 --- Comment #7 from Andrew Pinski --- GCC even warns for: template struct Foo : T { typedef T Base; Foo(int size) : Base(size) {} using Base::size; }; While clang does not even warn for this case: struct Foo { Foo(int size) {} int

[Bug c++/66472] -Wshadow gets confused by using statements in template classes

2015-06-09 Thread chtz at informatik dot uni-bremen.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66472 Christoph Hertzberg chtz at informatik dot uni-bremen.de changed: What|Removed |Added CC|

[Bug c++/66472] -Wshadow gets confused by using statements in template classes

2015-06-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66472 Jonathan Wakely redi at gcc dot gnu.org changed: What|Removed |Added Keywords||diagnostic

[Bug c++/66472] -Wshadow gets confused by using statements in template classes

2015-06-09 Thread gael.guennebaud at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66472 --- Comment #2 from Gael Guennebaud gael.guennebaud at gmail dot com --- But with the same reasoning you would end up reintroducing shadow warnings between local variables and *any* functions, not only the ones visible from a using statement. It

[Bug c++/66472] -Wshadow gets confused by using statements in template classes

2015-06-09 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66472 --- Comment #3 from Marc Glisse glisse at gcc dot gnu.org --- (In reply to Gael Guennebaud from comment #0) As suggested there https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57709#c16, I tried to break at the call to warning_at to give you more

[Bug c++/66472] -Wshadow gets confused by using statements in template classes

2015-06-09 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66472 --- Comment #5 from Manuel López-Ibáñez manu at gcc dot gnu.org --- (In reply to Marc Glisse from comment #3) I compile with g++ -wrapper gdb,--args ... where this gcc was compile with -O0 -g. Breaking on warning_at shows that member is a

[Bug c++/66472] -Wshadow gets confused by using statements in template classes

2015-06-09 Thread chtz at informatik dot uni-bremen.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66472 --- Comment #6 from Christoph Hertzberg chtz at informatik dot uni-bremen.de --- Ok, good point on shadowing free functions. Next pathological example: If you have a template specialization of your Base with a static member variable called

[Bug c++/66472] -Wshadow gets confused by using statements in template classes

2015-06-09 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66472 Manuel López-Ibáñez manu at gcc dot gnu.org changed: What|Removed |Added CC||manu at gcc