Your binutils patch today caused a "fatal warning"
Jakub Jelinek
jakub@redhat.com
Mon Jun 20 13:56:00 GMT 2005
On Mon, Jun 20, 2005 at 03:41:51PM +0200, Andreas Schwab wrote:
> Jakub Jelinek <jakub@redhat.com> writes:
>
> > Works for me just fine.
> > if (hdr->sh_entsize != (hdr->sh_type == SHT_REL
> > ? bed->s->sizeof_rel : bed->s->sizeof_rela))
> > return FALSE;
> >
> > Now, sizeof_rel and sizeof_rela are unsigned char, hdr->sh_entsize
> > is bfd_size_type, which ought to be unsigned type.
>
> unsigned char gets promoted to int, thus the warning is correct.
I know very well it promotes to int. Still, GCC knows there was
a smaller unsigned type promoted to that signed int and that it will
be always non-negative, so it can avoid the unnecessary warning.
Jakub
More information about the Binutils
mailing list