This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Warning patch installed to demangle.h/cplus-dem.c
- To: egcs-patches at egcs dot cygnus dot com
- Subject: Warning patch installed to demangle.h/cplus-dem.c
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Thu, 4 May 2000 14:22:25 -0400 (EDT)
Installed:
2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
include:
* demangle.h (demangler_engine): Constify.
libiberty:
* cplus-dem.c (cplus_demangle_opname, demangle_function_name):
Cast the arguments to `islower' to `unsigned char'.
(print_demangler_list): Prototype.
diff -rup orig/egcs-CVS20000503/include/demangle.h egcs-CVS20000503/include/demangle.h
--- orig/egcs-CVS20000503/include/demangle.h Sun Apr 30 08:20:54 2000
+++ egcs-CVS20000503/include/demangle.h Thu May 4 10:30:55 2000
@@ -83,9 +83,9 @@ extern enum demangling_styles
extern struct demangler_engine
{
- char *demangling_style_name;
+ const char *demangling_style_name;
enum demangling_styles demangling_style;
- char *demangling_style_doc;
+ const char *demangling_style_doc;
} libiberty_demanglers[];
extern char *
diff -rup orig/egcs-CVS20000503/libiberty/cplus-dem.c egcs-CVS20000503/libiberty/cplus-dem.c
--- orig/egcs-CVS20000503/libiberty/cplus-dem.c Sun Apr 30 08:20:58 2000
+++ egcs-CVS20000503/libiberty/cplus-dem.c Thu May 4 11:10:25 2000
@@ -679,8 +679,8 @@ cplus_demangle_opname (opname, result, o
}
}
else if (opname[0] == '_' && opname[1] == '_'
- && islower(opname[2])
- && islower(opname[3]))
+ && islower((unsigned char)opname[2])
+ && islower((unsigned char)opname[3]))
{
if (opname[4] == '\0')
{
@@ -4266,8 +4266,8 @@ demangle_function_name (work, mangled, d
}
}
else if (declp->b[0] == '_' && declp->b[1] == '_'
- && islower(declp->b[2])
- && islower(declp->b[3]))
+ && islower((unsigned char)declp->b[2])
+ && islower((unsigned char)declp->b[3]))
{
if (declp->b[4] == '\0')
{
@@ -4480,6 +4480,7 @@ static int flags = DMGL_PARAMS | DMGL_AN
static void demangle_it PARAMS ((char *));
static void usage PARAMS ((FILE *, int)) ATTRIBUTE_NORETURN;
static void fatal PARAMS ((const char *)) ATTRIBUTE_NORETURN;
+static void print_demangler_list PARAMS ((FILE *));
static void
demangle_it (mangled_name)