http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50424
Bug #: 50424 Summary: G++ doesn't notice possible throw from default argument Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: ja...@gcc.gnu.org This testcase ends up calling terminate because G++ doesn't notice that h() can throw because of the f() default argument used in the call to g(). int f() { throw 1; } void g( int = f() ) { } void h() { g(); } int main() { try { h(); } catch (int) { } } This issue also affects the implementation of C++11 non-static data member initializers that I'm working on.