This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] Warning roundup - ld/
Daniel Jacobowitz <firstname.lastname@example.org> 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.