This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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] Warning roundup - ld/


Daniel Jacobowitz <drow@mvista.com> writes:

> > However, I don't know lexsup.c is bothering to declare strtoul() at
> > all.
> 
> Shall I:
>  - just kill the declaration?  Presumably somewhere we aren't
>   picking it up, which is why it was present.
>  - Leave my patch - even if it is not a safe assumption it is just as safe
>   as not defining it at all.

Hmmm.  Removing the declaration will only hurt on systems on which int
is not the same as long.  However, all such systems almost certainly
provide strtoul, and declare it in <stdlib.h>.  So as a practical
matter, I think it is safe to simply remove the declaration.

In theory, we should leave the declaration and revert your path, but
that will only help on a system which provides <stdlib.h>, does not
declare strtoul() in <stdlib.h>, and for which int and long are
different.  I do not think that there are any such systems.

Ian


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