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.