Commit 099a9dd0 by Zack Weinberg Committed by Zack Weinberg

cppexp.c (parse_charconst): Initialize c.

1999-04-06 12:56 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
	* cppexp.c (parse_charconst): Initialize c.
	(cpp_parse_expr): Initialize rprio.
	* cppfiles.c (merge_include_chains): Initialize prev.
	(finclude) Set fp->line_base to fp->buf before returning.
	* cpphash.c (macroexpand): Initialize token.
	* cppspec.c (lang_specific_driver): Change suff to
	const char *const *.

From-SVN: r26213
parent 507df939
1999-04-06 12:56 -0400 Zack Weinberg <zack@rabi.columbia.edu>
* cppexp.c (parse_charconst): Initialize c.
(cpp_parse_expr): Initialize rprio.
* cppfiles.c (merge_include_chains): Initialize prev.
(finclude) Set fp->line_base to fp->buf before returning.
* cpphash.c (macroexpand): Initialize token.
* cppspec.c (lang_specific_driver): Change suff to
const char *const *.
1999-04-06 12:51 -0400 Zack Weinberg <zack@rabi.columbia.edu> 1999-04-06 12:51 -0400 Zack Weinberg <zack@rabi.columbia.edu>
* cppinit.c (install_predefs): Delete function. * cppinit.c (install_predefs): Delete function.
......
...@@ -254,10 +254,10 @@ parse_charconst (pfile, start, end) ...@@ -254,10 +254,10 @@ parse_charconst (pfile, start, end)
/* FIXME: Should use reentrant multibyte functions. */ /* FIXME: Should use reentrant multibyte functions. */
#ifdef MULTIBYTE_CHARS #ifdef MULTIBYTE_CHARS
wchar_t c; wchar_t c = (wchar_t)-1;
(void) mbtowc (NULL_PTR, NULL_PTR, 0); (void) mbtowc (NULL_PTR, NULL_PTR, 0);
#else #else
int c; int c = -1;
#endif #endif
if (*ptr == 'L') if (*ptr == 'L')
...@@ -701,7 +701,7 @@ cpp_parse_expr (pfile) ...@@ -701,7 +701,7 @@ cpp_parse_expr (pfile)
struct operation *stack = init_stack; struct operation *stack = init_stack;
struct operation *limit = stack + INIT_STACK_SIZE; struct operation *limit = stack + INIT_STACK_SIZE;
register struct operation *top = stack; register struct operation *top = stack;
int lprio, rprio; int lprio, rprio = 0;
int skip_evaluation = 0; int skip_evaluation = 0;
top->rprio = 0; top->rprio = 0;
......
...@@ -112,7 +112,7 @@ merge_include_chains (opts) ...@@ -112,7 +112,7 @@ merge_include_chains (opts)
Note that this algorithm is quadratic in the number of -I switches, Note that this algorithm is quadratic in the number of -I switches,
which is acceptable since there aren't usually that many of them. */ which is acceptable since there aren't usually that many of them. */
for (cur = quote; cur; cur = cur->next) for (cur = quote, prev = NULL; cur; cur = cur->next)
{ {
for (other = quote; other != cur; other = other->next) for (other = quote; other != cur; other = other->next)
if (INO_T_EQ (cur->ino, other->ino) if (INO_T_EQ (cur->ino, other->ino)
...@@ -680,6 +680,7 @@ finclude (pfile, fd, ihash) ...@@ -680,6 +680,7 @@ finclude (pfile, fd, ihash)
fp->system_header_p = ihash->foundhere->sysp; fp->system_header_p = ihash->foundhere->sysp;
fp->lineno = 1; fp->lineno = 1;
fp->colno = 1; fp->colno = 1;
fp->line_base = fp->buf;
fp->cleanup = file_cleanup; fp->cleanup = file_cleanup;
/* The ->actual_dir field is only used when ignore_srcdir is not in effect; /* The ->actual_dir field is only used when ignore_srcdir is not in effect;
......
...@@ -1081,7 +1081,7 @@ macroexpand (pfile, hp) ...@@ -1081,7 +1081,7 @@ macroexpand (pfile, hp)
if (nargs >= 0) if (nargs >= 0)
{ {
enum cpp_token token; enum cpp_token token = CPP_EOF;
args = (struct argdata *) alloca ((nargs + 1) * sizeof (struct argdata)); args = (struct argdata *) alloca ((nargs + 1) * sizeof (struct argdata));
......
...@@ -146,7 +146,7 @@ lang_specific_driver (errfn, in_argc, in_argv, in_added_libraries) ...@@ -146,7 +146,7 @@ lang_specific_driver (errfn, in_argc, in_argv, in_added_libraries)
{ {
int l = strlen (argv[i]); int l = strlen (argv[i]);
int known = 0; int known = 0;
const char **suff; const char *const *suff;
read_stdin = 0; read_stdin = 0;
for (suff = known_suffixes; *suff; suff++) for (suff = known_suffixes; *suff; suff++)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment