C++ PATCH: local classes and templates
Mark Mitchell
mark@codesourcery.com
Sun Jul 9 23:33:00 GMT 2000
The local_classes array shouldn't contain template types. Fixed thus.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
2000-07-09 Mark Mitchell <mark@codesourcery.com>
* decl.c (pushtag): Don't put local classes in template functions
on the local_classes list.
Index: decl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/decl.c,v
retrieving revision 1.652
diff -c -p -r1.652 decl.c
*** decl.c 2000/07/10 03:47:35 1.652
--- decl.c 2000/07/10 06:31:55
*************** pushtag (name, type, globalize)
*** 2899,2905 ****
way. (It's otherwise tricky to find a member function definition
it's only pointed to from within a local class.) */
if (TYPE_CONTEXT (type)
! && TREE_CODE (TYPE_CONTEXT (type)) == FUNCTION_DECL)
VARRAY_PUSH_TREE (local_classes, type);
if (!uses_template_parms (type))
--- 2899,2906 ----
way. (It's otherwise tricky to find a member function definition
it's only pointed to from within a local class.) */
if (TYPE_CONTEXT (type)
! && TREE_CODE (TYPE_CONTEXT (type)) == FUNCTION_DECL
! && !processing_template_decl)
VARRAY_PUSH_TREE (local_classes, type);
if (!uses_template_parms (type))
More information about the Gcc-patches
mailing list