This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
char *lbasename(const char *) VS const char *lbasename() ...
- To: GDB Discussion <gdb at sources dot redhat dot com>
- Subject: char *lbasename(const char *) VS const char *lbasename() ...
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Tue, 12 Jun 2001 15:47:37 -0400
Hello,
libiberty recently added the function:
char *lbasename (const char *name);
with semantics roughly equivalent to:
return (char *) name;
I'm thinking (serious :-) of sending a patch to the maintainers (GCC
list) asking that it changed to:
const char *lbasename (const char *name);
so that the fact that the string was constant isn't lost across the call
(If you're wondering, GDB will (once I've committed a recently posted
patch) compile with -Werror against either function).
Does anyone have any thoughts or suggestions before I try and do this :-)
Andrew