[Bug c++/26085] New: missing warning on non-void function with no return statement where parameter is UDT with destructor
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
[Bug c++/26085] missing warning on non-void function with no return statement where parameter is UDT with destructor
--- Comment #4 from jwray at google dot com 2006-02-03 01:30 --- Sorry, my build environment had -Wno-return-type set, because of bug 20624. This bug does apply to 2.95.3 though, but I imagine that won't be fixed. When I tried with 4.0.1, -Wno-return-type disabled the warning. So nevermind. -- jwray at google dot com changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26085