PR c++/10471
* call.c (build_cxx_call): Robustify.
PR c++/10471
* g++.dg/template/defarg2.C: New test.
From-SVN: r66032
+2003-04-23 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/10471
+ * call.c (build_cxx_call): Robustify.
+
2003-04-23 Neil Booth <neil@daikokuya.co.uk>
* Make-lang.in (lex.o): Remove mbchar.h.
/* If this call might throw an exception, note that fact. */
fndecl = get_callee_fndecl (fn);
- if ((!fndecl || !TREE_NOTHROW (fndecl)) && at_function_scope_p ())
+ if ((!fndecl || !TREE_NOTHROW (fndecl))
+ && at_function_scope_p ()
+ && cfun)
cp_function_chain->can_throw = 1;
/* Some built-in function calls will be evaluated at compile-time in
+2003-04-23 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/10471
+ * g++.dg/template/defarg2.C: New test.
+
2003-04-23 Neil Booth <neil@daikokuya.co.uk>
* gcc.dg/cpp/include2.c: Update.
--- /dev/null
+struct X {
+ X ();
+};
+
+template <int> struct O {
+ struct I {
+ I (const X & = X());
+ };
+};
+template struct O<2>;