This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[C++ Patch (documentation)] PR 19532
- From: Paolo Carlini <pcarlini at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 05 Aug 2007 19:40:00 +0200
- Subject: [C++ Patch (documentation)] PR 19532
Hi,
tested x86_64-linux, also took the occasion to change the return type.
Ok for mainline?
Paolo.
/////////////////////
2007-08-05 Paolo Carlini <pcarlini@suse.de>
PR c++/19532
* pt.c (template_class_depth): Fix comment; change return type
to bool.
Index: pt.c
===================================================================
*** pt.c (revision 127225)
--- pt.c (working copy)
*************** static int for_each_template_parm (tree,
*** 126,132 ****
struct pointer_set_t*);
static tree expand_template_argument_pack (tree);
static tree build_template_parm_index (int, int, int, tree, tree);
! static int inline_needs_template_parms (tree);
static void push_inline_template_parms_recursive (tree, int);
static tree retrieve_local_specialization (tree);
static void register_local_specialization (tree, tree);
--- 126,132 ----
struct pointer_set_t*);
static tree expand_template_argument_pack (tree);
static tree build_template_parm_index (int, int, int, tree, tree);
! static bool inline_needs_template_parms (tree);
static void push_inline_template_parms_recursive (tree, int);
static tree retrieve_local_specialization (tree);
static void register_local_specialization (tree, tree);
*************** template_class_depth (tree type)
*** 308,321 ****
return depth;
}
! /* Returns 1 if processing DECL as part of do_pending_inlines
! needs us to push template parms. */
! static int
inline_needs_template_parms (tree decl)
{
if (! DECL_TEMPLATE_INFO (decl))
! return 0;
return (TMPL_PARMS_DEPTH (DECL_TEMPLATE_PARMS (most_general_template (decl)))
> (processing_template_decl + DECL_TEMPLATE_SPECIALIZATION (decl)));
--- 308,321 ----
return depth;
}
! /* Subroutine of maybe_begin_member_template_processing.
! Returns true if processing DECL needs us to push template parms. */
! static bool
inline_needs_template_parms (tree decl)
{
if (! DECL_TEMPLATE_INFO (decl))
! return false;
return (TMPL_PARMS_DEPTH (DECL_TEMPLATE_PARMS (most_general_template (decl)))
> (processing_template_decl + DECL_TEMPLATE_SPECIALIZATION (decl)));