This is the mail archive of the gcc-regression@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: [PATCH] Fix: Re: GCC build failed for native with your patch on2003-07-06T23:56:04Z.


Andreas Jaeger <aj@suse.de> writes:

> Andrew Pinski <pinskia@physics.uc.edu> writes:
>
>> Looks like it was Mark's patch introduced a warning:
>>
>> +2003-07-06  Mark Mitchell  <mark@codesourcery.com>
>> +
>> +	PR c++/11345
>> +	* search.c (lookup_base_r): Remove is_non_public and
>> +	within_current_scope parameters.  Remove other dead code.
>> +	(lookup_base): Adjust call to lookup_base_r.
>> +	(adjust_result_of_qualified_name_lookup): Improve comment.
>> +	* semantics.c (finish_call_expr): Use maybe_dummy_object.
>>
>> ChageLog:
>> 2003-07-06  Andrew Pinski <pinskia@physics.uc.edu>
>>
>> 	* search.c (dynamic_cast_base_recurse): Remove unused variable.
>>
>> Patch:
>> Index: search.c
>> ===================================================================
>> RCS file: /cvs/gcc/gcc/gcc/cp/search.c,v
>> retrieving revision 1.270
>> diff -u -p -r1.270 search.c
>> --- search.c	6 Jul 2003 23:23:45 -0000	1.270
>> +++ search.c	7 Jul 2003 01:43:59 -0000
>> @@ -364,7 +364,6 @@ dynamic_cast_base_recurse (tree subtype,
>>     for (i = 0; i < n_baselinks; i++)
>>       {
>>         tree base_binfo = TREE_VEC_ELT (binfos, i);
>> -      tree base_access = TREE_VEC_ELT (accesses, i);
>>         int rval;
>>
>>         if (base_access != access_public_node)
>
> This is the wrong patch, base_access is used three lines further down.
>
> The warning is about base_access in line 199, I'll test this now,

Here's a patch, I've tested it by compiling the file and have
committed it as obvious,

Andreas

2003-07-07  Andreas Jaeger  <aj@suse.de>

	* search.c (lookup_base_r): Remove unused variable.

============================================================
Index: gcc/cp/search.c
--- cp/search.c	6 Jul 2003 23:23:45 -0000	1.270
+++ cp/search.c	7 Jul 2003 05:22:34 -0000
@@ -196,8 +196,6 @@ lookup_base_r (tree binfo, tree base, ba
   for (i = TREE_VEC_LENGTH (bases); i--;)
     {
       tree base_binfo = TREE_VEC_ELT (bases, i);
-      tree base_access = TREE_VEC_ELT (accesses, i);
-      
       base_kind bk;
 
       bk = lookup_base_r (base_binfo, base,

-- 
 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
  SuSE Linux AG, Deutschherrnstr. 15-19, 90429 Nürnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126


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