This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
In pt.c, find_parameter_packs_r, should TYPE_P(t) assure TYPE_CONTEXT(t)?
- From: Larry Evans <cppljevans at suddenlink dot net>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 03 Aug 2009 07:32:33 -0500
- Subject: In pt.c, find_parameter_packs_r, should TYPE_P(t) assure TYPE_CONTEXT(t)?
While trying to track down the cause of:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40092
I encountered what may be an error. In pt.c around
line 2493, there's this:
if (TYPE_P (t) )
cp_walk_tree (&TYPE_CONTEXT (t),
&find_parameter_packs_r, ppd, ppd->visited);
However, gdb shows TYPE_CONTEXT(t) is the constant, 0, during
compile of src.cpp:
http://gcc.gnu.org/bugzilla/attachment.cgi?id=18288
To avoid this, should the if condition be changed to:
if (TYPE_P (t) && TYPE_CONTEXT(t) )
or is TYPE_CONTEXT(t) == 0 possibly caused by a bug elsewhere?
TIA.
-Larry