This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [Patch] Fix build warnings for GAS on mips-linux-gnu
On Tue, Jul 10, 2012 at 06:32:37PM +0100, Maciej W. Rozycki wrote:
> On Tue, 10 Jul 2012, Alan Modra wrote:
>
> > > > > P.S. As an aside, is it intentional that the fall-back specifications are not proper prototypes?
> > > >
> > > > Yes. It saves trouble with "const char *" vs. "char *", "unsigned
> > > > long" vs. "unsigned int" and the like differences when we provide a
> > > > declaration that doesn't match some system header declaration.
> > >
> > > Hmm, two issues here:
> > >
> > > 1. Does it really matter given that the actual purpose of these fallback
> > > declarations is to address the case where there are no respective
> > > system-header declarations or prototypes in the first place (assuming
> > > of course that e.g. sizeof (unsigned long) equals sizeof (unsigned
> > > int) where applicable)?
> >
> > I think the failure mode was in cases where the HAVE_* macros were not
> > defined for some reason even though the system headers have a
> > declaration.
>
> But that would be a bug in our configury then (such as one observed by
> Iain), and there is no guarantee that the implicit types are going to be
> compatible with ones actually used by the system in question.
Yes, it does seem a bit odd. I'm beginning to wish I hadn't tried to
answer your question about fall-back declarations.. Maybe Nick or Ian
can shed more light on this?
--
Alan Modra
Australia Development Lab, IBM