https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90201
--- Comment #4 from Dima Pro ---
(In reply to Jonathan Wakely from comment #3)
> You get a warning with -Wuseless-cast
Yes, sorry. Miss this.
Anyway, no useless cast warning should be for this code.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90201
--- Comment #2 from Dima Pro ---
without -Werror=useless-cast no warning for this code at all.(In reply to
Jonathan Wakely from comment #1)
> N.B. This is a warning, not an error. Reporting that you get an error
> because you turned it into an er
++
Assignee: unassigned at gcc dot gnu.org
Reporter: prokofjev.d at gmail dot com
Target Milestone: ---
Compiler options:
$ gcc kill_me.cpp -Wall -Wextra -std=c++17 "-Werror=useless-cast"
Code:
class foo
{
void bar(foo&& f)
{
foo(static_cast(f));