diff options
author | Jason Merrill <jason@redhat.com> | 2011-07-16 00:11:53 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2011-07-16 00:11:53 -0400 |
commit | b6c917ff5dbdbbf3547d7198eff249936f7011fa (patch) | |
tree | be316d2adfde34ba7f9bc197ea6bd6f4528452f0 /gcc/cp/semantics.c | |
parent | ea6136a283596a40c177cf79e01c204cc2fc555e (diff) | |
download | gcc-b6c917ff5dbdbbf3547d7198eff249936f7011fa.zip gcc-b6c917ff5dbdbbf3547d7198eff249936f7011fa.tar.gz gcc-b6c917ff5dbdbbf3547d7198eff249936f7011fa.tar.bz2 |
Make-lang.in (check-g++-strict-gc): New.
* Make-lang.in (check-g++-strict-gc): New.
(cp/except.o): Depend on gt-cp-except.h
* except.c: Include gt-cp-except.h.
* config-lang.in (gtfiles): Add cp/except.c.
* decl2.c (mark_used): Adjust constexpr condition, set
function_depth around template instantiation.
* parser.c (cp_parser_lambda_body): Set function_depth.
* semantics.c (maybe_add_lambda_conv_op): Likewise.
From-SVN: r176350
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r-- | gcc/cp/semantics.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index fadef4d..fdd6c33 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -8875,6 +8875,10 @@ maybe_add_lambda_conv_op (tree type) if (nested) push_function_context (); + else + /* Still increment function_depth so that we don't GC in the + middle of an expression. */ + ++function_depth; /* Generate the body of the thunk. */ @@ -8927,6 +8931,8 @@ maybe_add_lambda_conv_op (tree type) if (nested) pop_function_context (); + else + --function_depth; } /* Returns true iff VAL is a lambda-related declaration which should |