From: Ian Lance Taylor Date: Thu, 18 Jan 1996 16:30:48 +0000 (+0000) Subject: Add const where appropriate X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=47fd14f4dfebde589696dd546f81b024206cc489;p=gcc.git Add const where appropriate From-SVN: r11064 --- diff --git a/gcc/cplus-dem.c b/gcc/cplus-dem.c index 3eb27cc9b84..53a668dda5a 100644 --- a/gcc/cplus-dem.c +++ b/gcc/cplus-dem.c @@ -1,5 +1,5 @@ /* Demangler for GNU C++ - Copyright 1989, 1991, 1994, 1995 Free Software Foundation, Inc. + Copyright 1989, 1991, 1994, 1995, 1996 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.uucp) Rewritten by Fred Fish (fnf@cygnus.com) for ARM and Lucid demangling @@ -323,7 +323,7 @@ consume_count (type) int cplus_demangle_opname (opname, result, options) - char *opname; + const char *opname; char *result; int options; { @@ -450,9 +450,9 @@ cplus_demangle_opname (opname, result, options) If OPTIONS & DMGL_ANSI == 1, return the ANSI name; if OPTIONS & DMGL_ANSI == 0, return the old GNU name. */ -char * +const char * cplus_mangle_opname (opname, options) - char *opname; + const char *opname; int options; { int i; @@ -464,7 +464,7 @@ cplus_mangle_opname (opname, options) if (strlen (optable[i].out) == len && (options & DMGL_ANSI) == (optable[i].flags & DMGL_ANSI) && memcmp (optable[i].out, opname, len) == 0) - return ((char *)optable[i].in); + return optable[i].in; } return (0); } diff --git a/gcc/demangle.h b/gcc/demangle.h index 8dcd5fd06a6..d4d0a3f428e 100644 --- a/gcc/demangle.h +++ b/gcc/demangle.h @@ -1,5 +1,5 @@ /* Defs for interface to demanglers. - Copyright 1992, 1995 Free Software Foundation, Inc. + Copyright 1992, 1995, 1996 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -95,10 +95,10 @@ extern char * cplus_demangle PARAMS ((const char *mangled, int options)); extern int -cplus_demangle_opname PARAMS ((char *opname, char *result, int options)); +cplus_demangle_opname PARAMS ((const char *opname, char *result, int options)); -extern char * -cplus_mangle_opname PARAMS ((char *opname, int options)); +extern const char * +cplus_mangle_opname PARAMS ((const char *opname, int options)); /* Note: This sets global state. FIXME if you care about multi-threading. */