This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/68230] Unused function parameters not reported by -Wunused-parameter when only used recursively.
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 28 Sep 2017 13:00:28 +0000
- Subject: [Bug c++/68230] Unused function parameters not reported by -Wunused-parameter when only used recursively.
- Auto-submitted: auto-generated
- References: <bug-68230-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68230
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I'm not sure there *should* be a warning here.
I find -Wunused-parameter most useful to know when I can remove the name of the
parameter, but you can't do that here (because it still needs a name to pass it
to the recursive call).
It's rare that my reaction to a -Wunused-parameter warning is to change the
function to remove the parameter entirely. YMMV.