This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

C++ PATCH for c++/79640, infinite recursion with generic lambda


Here, when we try to look up a constant variable from an enclosing
function when instantiating a generic lambda outside of the context of
that function, we make a dummy instantiation to use.  In this case,
the initializer refers to the variable, so we infinitely recurse until
we run out of stack.  Fixed by remembering the dummy instantiation
before we try to instantiate the initializer.

Tested x86_64-pc-linux-gnu, applying to trunk.

Attachment: 79640.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]