Here's a simple repro: struct s { ~s() {} // comment out this line to see warning };
int f(s) { } int main() { f(s()); } It seems if a function takes a user-defined type that has a destructor, the warning is inhibited. -- Summary: missing warning on non-void function with no return statement where parameter is UDT with destructor Product: gcc Version: 4.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jwray at google dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26085