[Bug libstdc++/95065] New: Remove std::bind1st and std::bind2nd when building in -std=c++17
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95065 Bug ID: 95065 Summary: Remove std::bind1st and std::bind2nd when building in -std=c++17 Product: gcc Version: 10.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: gcc at linkmauve dot fr Target Milestone: --- std::bind1st etc. got deprecated in C++11 and removed in C++17, but g++ still happily compiles them in while clang++ correctly removed them, leading to a build failure on the latter if the code didn’t get adapted. I’m on gcc 10.1.0, but I believe previous versions of libstdc++ also had this issue, so it would make sense to backport it to them once fixed.
[Bug c/71228] New: Add a warning when a variable gets initialised with itself
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71228 Bug ID: 71228 Summary: Add a warning when a variable gets initialised with itself Product: gcc Version: 6.1.1 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gcc at linkmauve dot fr Target Milestone: --- When a variable is initialised with itself, -Wuninitialized should emit a warning since the variable wasn’t initialised at the time of this assignment. The code in question (fix at https://github.com/SirCmpwn/aerc/pull/2.patch) can be summarised this way (assuming -Wno-unused-parameter): void test(int _value) { int value = value; } For reference, clang 3.8.0 gives this warning: warning: variable 'value' is uninitialized when used within its own initialization [-Wuninitialized]
[Bug c++/98044] New: Last line always highlighted as error in constructor initializer list when another is bogus
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98044 Bug ID: 98044 Summary: Last line always highlighted as error in constructor initializer list when another is bogus Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gcc at linkmauve dot fr Target Milestone: --- Created attachment 49641 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49641&action=edit Testcase reproducing this badly-placed error When a constructor has an initializer list with one being bogus, the error doesn’t point to the correct line but always to the last one. In the attached testcase, g++ correctly identifies foo(1, 2) as the culprit, but highlights bar() as the error: testcase.cpp:13:8: error: no matching function for call to ‘Foo::Foo(int, int)’ 13 | , bar()