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 11702


On Sat, 16 Aug 2003 13:02:51 +0200, Jan Hubicka <hubicka@ucw.cz> wrote:

> Mark, still there is missing mark_used, does this look fine to you?
> Sat Aug 16 12:59:13 CEST 2003  Jan Hubicka  <jh@suse.cz>
> 	PR C++/11702
> 	* semantics.c (finish_id_expression): Mark all functions as used.
> Index: semantics.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/cp/semantics.c,v
> retrieving revision 1.346
> diff -c -3 -p -r1.346 semantics.c
> *** semantics.c	15 Aug 2003 11:14:01 -0000	1.346
> --- semantics.c	16 Aug 2003 10:59:05 -0000
> *************** finish_id_expression (tree id_expression
> *** 2555,2560 ****
> --- 2555,2562 ----
>   		  (decl, scope, current_class_type));
>   	  if (TREE_CODE (decl) == FIELD_DECL || BASELINK_P (decl))
>   	    *qualifying_class = scope;
> + 	  if (TREE_CODE (decl) == FUNCTION_DECL)
> + 	    mark_used (decl);
>   	  else if (!processing_template_decl)
>   	    decl = convert_from_reference (decl);
>   	  else if (TYPE_P (scope))

I don't think you want to insert that into the middle of an if/else chain.
Put it at the end.

Jason


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