https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81518
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Resolution|INVALID |--- --- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> --- I disagree. A warning would be helpful even in the absence of a definition and evidence that the function actually access the pointed to data. A warning would also be helpful that pointed out that "it does not make sense for a const function to return void" as the manual states. Finally, even if the warning shouldn't be issued for declarations without the evidence that the argument pointer isn't accessed, the warning could be triggered once a definition were seen that did violate these requirements.