[Bug c++/105840] confusing diagnostic when naming the wrong class in a constructor

barry.revzin at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri Jun 3 18:10:08 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105840

--- Comment #2 from Barry Revzin <barry.revzin at gmail dot com> ---
I think something to this effect maybe?

<source>:9:7: error: attempting to declare constructor for unrelated class 'A';
did you mean to use 'B'?
    9 |     A(int i);
      |     ^~
      |     B


More information about the Gcc-bugs mailing list