This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
C++ PATCH for c++/41119, 41120
- From: Jason Merrill <jason at redhat dot com>
- To: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 19 Aug 2009 13:25:42 -0400
- Subject: C++ PATCH for c++/41119, 41120
Synthesizing in the middle of a default argument was problematic because
we don't want to run the garbage collector in the middle of overload
resolution, because the overload candidates aren't marked for GC.
cp_parser_default_argument dealt with this by setting function_depth
around parsing of the default argument, but that didn't cover the case
of synthesizing for initializing a namespace-scope variable. But if
synthesis is the problem, we should set function_depth while
synthesizing, not around the larger scope.
Tested x86_64-pc-linux-gnu, applied to trunk.