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: [Ada] Fix more -Wc++-compat warnings


On Sat, 2009-06-27 at 18:15 +0200, Laurent GUERBY wrote:
> On Sat, 2009-06-27 at 17:42 +0200, Richard Guenther wrote:
> > On Sat, Jun 27, 2009 at 4:46 PM, Eric Botcazou<ebotcazou@adacore.com> wrote:
> > > This enables -Werror for the Ada compiler, fixes the remaining -Wc++-compat
> > > warnings to unbreak bootstrap and renames a few locals Laurent changed to
> > > avoid reformatting too many lines.
> > >
> > > Bootstrapped/regtested on i586-suse-linux, applied on the mainline.
> > 
> > This broke non-c++ bootstrap for me on x86_64:
> > 
> > In file included from ../../trunk/gcc/ada/tracebak.c:396:0:
> > ../../trunk/gcc/ada/tb-gcc.c: In function 'trace_callback':
> > ../../trunk/gcc/ada/tb-gcc.c:85:10: error: comparison of distinct
> > pointer types lacks a cast
> > ../../trunk/gcc/ada/tb-gcc.c:85:39: error: comparison of distinct
> > pointer types lacks a cast
> > make[3]: *** [ada/tracebak.o] Error 1
> 
> Likely caused by an interaction between my patch (which introduced a
> warning I did not see) and Eric's one turning on Werror.
> 
> I'm testing the patch below.

It restores bootstrap and no tb-gcc warning.

Laurent

> Laurent
> 
> Index: gcc/ada/tb-gcc.c
> ===================================================================
> --- gcc/ada/tb-gcc.c	(revision 149013)
> +++ gcc/ada/tb-gcc.c	(working copy)
> @@ -82,7 +82,7 @@
>    if (uw_data->n_entries_filled >= uw_data->max_len)
>      return _URC_NORMAL_STOP;
>  
> -  if (pc < uw_data->exclude_min || pc > uw_data->exclude_max)
> +  if (pc < (char *)uw_data->exclude_min || pc > (char *)uw_data->exclude_max)
>      uw_data->traceback [uw_data->n_entries_filled ++] = pc + PC_ADJUST;
>  
>    return _URC_NO_REASON;
> 
> 
> 
> 



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