This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Scale DW_CFA_advance_loc[124] output values
On Wed, Nov 19, 2008 at 10:09:21PM +0100, Andreas Schwab wrote:
> Jakub Jelinek <jakub@redhat.com> writes:
>
> > On Wed, Nov 19, 2008 at 09:03:42PM +0100, Andreas Schwab wrote:
> >> Jakub Jelinek <jakub@redhat.com> writes:
> >> > + else if ((exp->X_op == O_divide
> >> > + || exp->X_op == O_right_shift)
> >> > + && d->cie_info.code_alignment > 1)
> >> > + {
> >> > + if (exp->X_add_symbol->bsym
> >> > + && exp->X_op_symbol->bsym
> >> > + && exp->X_add_symbol->sy_value.X_op == O_subtract
> >> > + && exp->X_op_symbol->sy_value.X_op == O_constant
> >> > + && ((exp->X_op == O_divide
> >> > + ? exp->X_op_symbol->sy_value.X_add_number
> >> > + : (offsetT) 1 << exp->X_op_symbol->sy_value.X_add_number)
> >> > + == d->cie_info.code_alignment))
> >>
> >> ../../binutils/gas/ehopt.c: In function ???check_eh_frame???:
> >> ../../binutils/gas/ehopt.c:441: error: comparison between signed and unsigned
> >
> > gcc 4.3.2 didn't complain, even with -W -Wall -Werror.
>
> How big is your offsetT?
This was a x86_64-linux -> powerpc-linux cross, so offsetT (type of
X_add_number) was (64-bit) long, whereas code_alignment is (32-bit) unsigned int.
For that GCC doesn't warn.
Jakub