https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92748
Bug ID: 92748
Summary: Two different -Wreturn-type diagnostics for
essentially same code
Product: gcc
Version: 9.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: jengelh at inai dot de
Target Milestone: ---
-- Input --
» cat x.c
static void *f() {}
void *g() {}
-- Observed output --
» gcc x.c -c -Wall -v
gcc version 9.2.1 20190903 [gcc-9-branch revision 275330] (SUSE Linux)
…
x.c:1:1: warning: no return statement in function returning non-void
[-Wreturn-type]
x.c:2:1: warning: control reaches end of non-void function [-Wreturn-type]
-- Expected output --
Emit the same diagnostic messages for both issues, e.g.
x.c:1:1: warning: no return statement in function returning non-void
[-Wreturn-type]
x.c:2:1: warning: no return statement in function returning non-void
[-Wreturn-type]