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] PR c++/11530


On Mon, 2003-07-28 at 09:04, Jan Hubicka wrote:
> > On Sun, 2003-07-27 at 13:36, Jan Hubicka wrote:
> > > Hi,
> > > this appars to be another missing mark_used call in C++ frontend.
> > > 
> > > Honza
> > > 
> > > Sun Jul 27 22:35:09 CEST 2003  Jan Hubicka  <jh@suse.cz>
> > > 	PR c++/11530
> > > 	* typeck.c (build_address): Add missing mark_used.
> > > Index: typeck.c
> > > ===================================================================
> > > RCS file: /cvs/gcc/gcc/gcc/cp/typeck.c,v
> > > retrieving revision 1.483
> > > diff -c -3 -p -r1.483 typeck.c
> > > *** typeck.c	19 Jul 2003 16:09:47 -0000	1.483
> > > --- typeck.c	27 Jul 2003 20:34:40 -0000
> > > *************** build_address (tree t)
> > > *** 3804,3809 ****
> > > --- 3804,3810 ----
> > >   
> > >     if (error_operand_p (t) || !cxx_mark_addressable (t))
> > >       return error_mark_node;
> > > +   mark_used (t);
> > >   
> > >     addr = build1 (ADDR_EXPR, 
> > >   		 build_pointer_type (TREE_TYPE (t)),
> > 
> > This patch is certainly incorrect, since there is no guarantee that T is
> > a decl.
> > 
> > What is the call stack at the point that build_address is called?
> It comes from the build_unary_operator fromt the same file, if I recall
> correctly.

I think we need to look further, then.  In general, mark_used should be
called when the expression for the function is first parsed.

-- 
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com


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