Patch to constify/prototype/clean collect2.[ch] & tlink.c, part 1/2
Richard Henderson
rth@cygnus.com
Thu Sep 2 10:45:00 GMT 1999
On Thu, Sep 02, 1999 at 07:46:02AM -0700, Mark Mitchell wrote:
> I think if there sare system functions that are "logically const", we
> should just cast `const char *' to `char *' when passing them their
> arguments. Yes, with full warnings GCC will still complain, but so be
> it.
Actually, I'd prefer to _not_ cast and get the `discards qualifiers'
warning on broken systems. That avoids a warning on correct systems.
But I agree we shouldn't be duping strings just to get rid of the
cast warnings.
If you like, add a comment before the indicated line noting that
systems x, y, and z are broken wrt their prototypes so that some
other well-meaning soul doesn't come along and try to add the cast.
r~
More information about the Gcc-patches
mailing list