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

--- Comment #6 from Martin Sebor <msebor at gcc dot gnu.org> ---
The GCC manual says that "It does not make sense for a const function to return
void" so I would tend to think of the suggestion as a bug.  With that, I would
recommend either disabling -Wsuggest-attribute=const when the definition of the
function is being compiled by an older version of GCC, or conditionally adding
a const declaration of the void function into the source file (not the header)
just for the older compilers.

Reply via email to