[no subject]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



HI, I am new in gcc codebase. Can you explain please why we can't just use
TREE_TYPE(parm) for TEMLATE_TEMPLATE_PARM and why DECL_INITIAL is needed
for it? I tried to debug Bug 114377 and it seems to work fine. Thanks

--- a/gcc/cp/pt.cc
+++ b/gcc/cp/pt.cc
@@ -11032,10 +11032,7 @@ find_template_parameter_info::found (tree parm)
 {
   if (TREE_CODE (parm) == TREE_LIST)
     parm = TREE_VALUE (parm);
-  if (TREE_CODE (parm) == TYPE_DECL)
-    parm = TREE_TYPE (parm);
-  else
-    parm = DECL_INITIAL (parm);
+  parm = TREE_TYPE(parm);
   gcc_checking_assert (TEMPLATE_PARM_P (parm));
   return parms.contains (parm);
 }



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux