The following code is meaningless therefore should produce the WARNING. At least would be useful to have some pedantic warning mode when this should produce warning.
Yuri -------testcase---------- void a() { } void f() { return a(); } -- Summary: return from funcrtion of void value allowed Product: gcc Version: 4.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: yuri at tsoft dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25986