This is the mail archive of the gcc-patches@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]

Re: [C++ patch] Fix TREE_USED flag in some cases


> > *************** start_cleanup_fn (void)
> > *** 8415,8420 ****
> > --- 8415,8421 ----
> >        it is only called via a function pointer, but we avoid unnecessary
> >        emissions this way.  */
> >     DECL_INLINE (fndecl) = 1;
> > +   TREE_USED (fndecl) = 1;
> >     /* Build the parameter.  */
> >     if (flag_use_cxa_atexit)
> >       {
> 
> This should happen after the call to cxx_mark_addressable in
> register_dtor_fn, not here.  And it should use mark_used.
> 
> > +       /* RTTI entries are casted to vfunc_ptr_type_node.  */
> > +       if (TREE_CODE (fnaddr) == NOP_EXPR)
> > + 	fnaddr = TREE_OPERAND (fnaddr, 0);
> 
> Use SKIP_NOPS.

Actually I can not find such macro anywhere.  Am I supposed to invent
it? (it would probably be function in tree.c as nops can be chained,
right?)

Honza


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