egcs-19990602/libiberty size_t etc fixes

Philippe De Muyter
Wed Jun 30 23:15:00 GMT 1999

>   In message < >you write:
>   > That would perhaps be better, but none of the libiberty files does it that 
>   > way.
> I would consider that a bug.
>   > They basically all use the simple method that I used, with small variations
>   > from file to file :
>   > 
>   > void * instead of char *,
>   > PTR instead of char *,
>   > parameter list enclosed in PARAMS()
> Right.  And these schemes are prone to problems when the system provides
> a declaration -- which is precisely what NEED_DECLARATION_MALLOC avoids.
>   > So, for the moment, I'd prefer to stick with my proposed change.
> I'd much prefer to start fixing these problems rather than introduce more
> instances of an old problem.
> In fact, I'd like to see all the declarations of malloc be wrapped in a
> NEED_DECLARATION_MALLOC as part of this change.  It should be trivial and

Actually, NEED_DECLARATION_xxx depends on the macros GCC_NEED_DECLARATION(S)
which are not part of autoconf and are defined in gcc/aclocal.m4.
Should they be copied into a libiberty/aclocal.m4 (I'd prefer not to),
or may libiberty be considered to be a part of gcc ? (I don't think so,
as it is also included by binutils)
Then, to make it clean, one should have a `system.h' file, like in gcc
where all those conditional declarations would be kept.
If we see it the other way, we probably could let libiberty do all
the configure work, and enhance libiberty.h
to provide those missing declarations and use libiberty.h everyhwere
instead of system.h, or whatever it is called elsewhere.

Comments ?

> would remove this set of problems from libiberty once and for all.
> jeff


More information about the Gcc-patches mailing list