gas configure cleanup
Steve Ellcey
sje@cup.hp.com
Mon Jul 18 23:29:00 GMT 2005
> >! #if !HAVE_DECL_MALLOC
> > extern PTR malloc ();
>
> The above is just an example. I'm not sure what the best solution is but
> possibly '-Werror' needs to be disabled when a declaration for a function
> needs to be provided. The prototype for malloc as written above will generate
> an warning on a system that lacks a malloc prototype. I hit this trying
> to build a recent version of binutils on vax-dec-ultrix last month.
>
> Dave
> --
> J. David Anglin dave.anglin@nrc-cnrc.gc.ca
> National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
Can we just ansify the prototype and make them correct? We only use
-Werror if building with GCC and I assume that it is the lack of an
argument list that generates the warning. PTR is a #define for 'void *'
in src/include/ansidecl.h (char *, if _STDC_ is not set) so the return
type should be OK if compiling with GCC and _STDC_ is set.
src/gas/hash.h is already using size_t with no ifdef's around it. I
assume we would need to ansify the rest of them too (free, ffs, etc).
You can also configure with --diable-werror to allow compilation with
warnings.
At any rate, I don't believe my patch makes this problem better or worse
than it is now.
Steve Ellcey
sje@cup.hp.com
More information about the Binutils
mailing list