This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]