public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* (no subject)
@ 2024-03-21 15:12 Centurion
  2024-03-21 15:26 ` your mail Segher Boessenkool
  0 siblings, 1 reply; 4+ messages in thread
From: Centurion @ 2024-03-21 15:12 UTC (permalink / raw)
  To: gcc-help

[-- Attachment #1: Type: text/plain, Size: 623 bytes --]

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);
 }

^ permalink raw reply	[flat|nested] 4+ messages in thread
[parent not found: <20040223154755.23916.qmail@web41606.mail.yahoo.com>]

end of thread, other threads:[~2024-03-24  9:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-21 15:12 Centurion
2024-03-21 15:26 ` your mail Segher Boessenkool
2024-03-24  9:30   ` Centurion
     [not found] <20040223154755.23916.qmail@web41606.mail.yahoo.com>
2004-02-23 16:42 ` Michael Matz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).