aboutsummaryrefslogtreecommitdiff
path: root/gcc/cexp.y
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1999-03-06 05:34:26 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>1999-03-06 05:34:26 +0000
commitdff01034e5a90c29e68d9aa436cbef7ef2268035 (patch)
treec772c985a70004b9455673e66fda09916b427de1 /gcc/cexp.y
parent3c2a0097066b2f122d4ae0a70bde6e8f1721081a (diff)
downloadgcc-dff01034e5a90c29e68d9aa436cbef7ef2268035.zip
gcc-dff01034e5a90c29e68d9aa436cbef7ef2268035.tar.gz
gcc-dff01034e5a90c29e68d9aa436cbef7ef2268035.tar.bz2
c-aux-info.c (data_type, [...]): Qualify a char* with the `const' keyword.
* c-aux-info.c (data_type, affix_data_type, gen_decl, gen_formal_list_for_type, gen_formal_list_for_func_def, gen_type): Qualify a char* with the `const' keyword. * c-common.c (declare_hidden_char_array, add_attribute, if_elt, declare_function_name, decl_attributes, format_char_info, check_format_info, binary_op_error): Likewise. * cexp.y (yyerror, error, pedwarn, warning, token): Likewise. * gcse.c (dump_hash_table): Likewise. * integrate.c (function_cannot_inline_p): Likewise * optabs.c: Include insn-config.h earlier. (init_libfuncs, init_integral_libfuncs, init_floating_libfuncs): Qualify a char* with the `const' keyword. * real.c (asctoe24, asctoe53, asctoe64, asctoe113, asctoe, asctoeg, mtherr, ereal_atof): Likewise. * real.h (ereal_atof): Likewise. * sbitmap.c (dump_sbitmap_vector): Likewise. * sbitmap.h (dump_sbitmap_vector): Likewise. * stmt.c (nesting, n_occurrences, expand_start_case): Likewise. * toplev.c (rest_of_compilation): Likewise. * tree.h (function_cannot_inline_p, expand_start_case): Likewise. From-SVN: r25614
Diffstat (limited to 'gcc/cexp.y')
-rw-r--r--gcc/cexp.y19
1 files changed, 10 insertions, 9 deletions
diff --git a/gcc/cexp.y b/gcc/cexp.y
index 76818e8..9ccc025 100644
--- a/gcc/cexp.y
+++ b/gcc/cexp.y
@@ -1,5 +1,5 @@
/* Parse C expressions for CCCP.
- Copyright (C) 1987, 92, 94, 95, 96, 97, 1998 Free Software Foundation.
+ Copyright (C) 1987, 92, 94-98, 1999 Free Software Foundation.
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 the
@@ -50,7 +50,8 @@ struct arglist {
HOST_WIDEST_INT parse_c_expression PROTO((char *, int));
static int yylex PROTO((void));
-static void yyerror PVPROTO((char *, ...)) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
+static void yyerror PVPROTO((const char *, ...))
+ ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
static HOST_WIDEST_INT expression_value;
#ifdef TEST_EXP_READER
static int expression_signedp;
@@ -135,9 +136,9 @@ struct constant;
HOST_WIDEST_INT parse_escape PROTO((char **, HOST_WIDEST_INT));
int check_assertion PROTO((U_CHAR *, int, int, struct arglist *));
struct hashnode *lookup PROTO((U_CHAR *, int, int));
-void error PVPROTO((char *, ...)) ATTRIBUTE_PRINTF_1;
-void pedwarn PVPROTO((char *, ...)) ATTRIBUTE_PRINTF_1;
-void warning PVPROTO((char *, ...)) ATTRIBUTE_PRINTF_1;
+void error PVPROTO((const char *, ...)) ATTRIBUTE_PRINTF_1;
+void pedwarn PVPROTO((const char *, ...)) ATTRIBUTE_PRINTF_1;
+void warning PVPROTO((const char *, ...)) ATTRIBUTE_PRINTF_1;
static int parse_number PROTO((int));
static HOST_WIDEST_INT left_shift PROTO((struct constant *, unsigned HOST_WIDEST_INT));
@@ -494,7 +495,7 @@ parse_number (olen)
}
struct token {
- char *operator;
+ const char *operator;
int token;
};
@@ -1001,17 +1002,17 @@ parse_c_expression (string, warn_undefined)
}
static void
-yyerror VPROTO ((char * msgid, ...))
+yyerror VPROTO ((const char * msgid, ...))
{
#ifndef ANSI_PROTOTYPES
- char * msgid;
+ const char * msgid;
#endif
va_list args;
VA_START (args, msgid);
#ifndef ANSI_PROTOTYPES
- msgid = va_arg (args, char *);
+ msgid = va_arg (args, const char *);
#endif
fprintf (stderr, "error: ");