aboutsummaryrefslogtreecommitdiff
path: root/gcc/tradcpp.c
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2001-12-23 16:07:16 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2001-12-23 16:07:16 +0000
commit0b5826acc87bbaf5c4488610ce43939d45ca5607 (patch)
tree3a92e39c3950a0111e36bf45eea110d72fbf1e8a /gcc/tradcpp.c
parent14aacce76e18b19ea57b6f6dbeda4cad4b634b1a (diff)
downloadgcc-0b5826acc87bbaf5c4488610ce43939d45ca5607.zip
gcc-0b5826acc87bbaf5c4488610ce43939d45ca5607.tar.gz
gcc-0b5826acc87bbaf5c4488610ce43939d45ca5607.tar.bz2
arc.c (arc_hard_regno_mode_ok): Const-ify.
* arc.c (arc_hard_regno_mode_ok): Const-ify. * arc.h (arc_hard_regno_mode_ok): Likewise. * i386.c (x86_64_reg_class_name): Make static. * m68k.c (regno_reg_class): Const-ify. * m68k.h (regno_reg_class): Likewise. * mcore.c (reg_class_from_letter): Likewise. * mcore.h (reg_class_from_letter): Likewise. * sh.c (reg_class_from_letter, ashiftrt_insns, shift_insns, ext_shift_insns, ext_shift_amounts): Likewise. * sh.h (reg_class_from_letter): Likewise. * sparc.c (hard_regno_mode_classes, hard_32bit_mode_classes, hard_64bit_mode_classes): Likewise. * sparc.h (hard_regno_mode_classes): Likewise. * gcc.c (modify_target): Make static. * gengenrtl.c (defs, formats): Likewise. * reload1.c (elim_table_1, init_elim_table): Const-ify. * tradcpp.c (directive, directive_table, handle_directive, skip_if_group, run_directive): Likewise. cp: * decl2.c (lang_f_options): Const-ify. f: * com.c (ffecom_gfrt_volatile_, ffecom_gfrt_complex_, ffecom_gfrt_const_, ffecom_gfrt_type_): Const-ify. java: * Make-lang.in (keyword.h): Pass -C to gperf to const-ify the static arrays that are output. * jvspec.c (jvgenmain_spec): Make static. * keyword.gperf (struct java_keyword, java_keyword): Const-ify. * keyword.h: Regenerate. * lang.c (string_option, process_option_with_no, lang_f_options, lang_W_options): Const-ify. * lex.c (java_lex): Likewise. From-SVN: r48290
Diffstat (limited to 'gcc/tradcpp.c')
-rw-r--r--gcc/tradcpp.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/tradcpp.c b/gcc/tradcpp.c
index c7af4c7..11c5fd3 100644
--- a/gcc/tradcpp.c
+++ b/gcc/tradcpp.c
@@ -310,11 +310,11 @@ HASHNODE *hashtab[HASHSIZE];
/* `struct directive' defines one #-directive, including how to handle it. */
struct directive {
- int length; /* Length of name */
- void (*func) PARAMS ((U_CHAR *, U_CHAR *, FILE_BUF *));
+ const int length; /* Length of name */
+ void (*const func) PARAMS ((U_CHAR *, U_CHAR *, FILE_BUF *));
/* Function to handle directive */
- const char *name; /* Name of directive */
- enum node_type type; /* Code which describes which directive. */
+ const char *const name; /* Name of directive */
+ const enum node_type type; /* Code which describes which directive. */
};
/* Last arg to output_line_command. */
@@ -446,7 +446,7 @@ int main PARAMS ((int, char **));
/* Here is the actual list of #-directives, most-often-used first. */
-struct directive directive_table[] = {
+static const struct directive directive_table[] = {
{ 6, do_define, "define", T_DEFINE },
{ 7, do_include, "include", T_INCLUDE },
{ 5, do_endif, "endif", T_ENDIF },
@@ -1904,7 +1904,7 @@ handle_directive (ip, op)
FILE_BUF *ip, *op;
{
U_CHAR *bp, *cp;
- struct directive *kt;
+ const struct directive *kt;
int ident_length;
U_CHAR *resume_p;
@@ -3684,7 +3684,7 @@ skip_if_group (ip, any)
{
U_CHAR *bp = ip->bufp, *cp;
U_CHAR *endb = ip->buf + ip->length;
- struct directive *kt;
+ const struct directive *kt;
IF_STACK_FRAME *save_if_stack = if_stack; /* don't pop past here */
U_CHAR *beg_of_line = bp;
@@ -5117,7 +5117,7 @@ run_directive (str, len, type)
size_t len;
enum node_type type;
{
- struct directive *kt;
+ const struct directive *kt;
FILE_BUF *ip = &instack[++indepth];
ip->fname = "*command line*";