https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65452
--- Comment #8 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Created attachment 39880 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39880&action=edit Wsame-arguments I'm attaching a patch to implement a warning for this, named -Wsame-arguments. The problem is that the C++ FE doesn't have good location information for arguments of functions, so the warning's not really useful for C++. And another problem is that constants/decls don't have location information, so there might be false positives.