re PR c++/10471 (SegFault in build_cxx_call)
PR c++/10471 * call.c (build_cxx_call): Robustify. PR c++/10471 * g++.dg/template/defarg2.C: New test. From-SVN: r66032
This commit is contained in:
parent
6ff76c365c
commit
374ca7f74e
@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
@ -4737,7 +4737,9 @@ build_cxx_call(tree fn, tree args, tree converted_args)
|
||||
|
||||
/* 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
|
||||
|
@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
10
gcc/testsuite/g++.dg/template/defarg2.C
Normal file
10
gcc/testsuite/g++.dg/template/defarg2.C
Normal file
@ -0,0 +1,10 @@
|
||||
struct X {
|
||||
X ();
|
||||
};
|
||||
|
||||
template <int> struct O {
|
||||
struct I {
|
||||
I (const X & = X());
|
||||
};
|
||||
};
|
||||
template struct O<2>;
|
Loading…
x
Reference in New Issue
Block a user