summaryrefslogtreecommitdiff
path: root/gcc/scan-decls.c
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1997-12-20 11:31:54 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1997-12-20 11:31:54 +0000
commit99c149474045fdf0e8347520f8e3b6bb6d932cfa (patch)
treefb640fe4c8c99759602e3a82e0ed835789f267eb /gcc/scan-decls.c
parentc866d7d40dedbe3a523310b611dedb93496e69f2 (diff)
downloadgcc-99c149474045fdf0e8347520f8e3b6bb6d932cfa.tar.gz
* bitmap.c (bitmap_clear): Ensure `inline' is at the beginning
of the declaration. * c-decl.c (finish_decl): Use parentheses around && within ||. * rtl.c: Include stdlib.h. (read_skip_spaces): Add parentheses around assignments used as truth values. (read_rtx): Initialize list_rtx. * cppexp.c (parse_number): Use || when operands are truth values. * alias.c (find_base_value): Add default case. (memrefs_conflict): Likewise. * combine.c (sets_function_arg_p): Likewise. * genemit.c (gen_exp): Likewise. * local-alloc.c (contains_replace_regs): Likewise. * rtlanal.c (jmp_uses_reg_or_mem): Likewise. * fold-const.c (fold_convert): Use "&&" for truth values. (fold): Add default case. * sdbout.c (sdbout_field_types): Fix typo in declaration. (sdbout_one_type): Add default case. * alpha.c (alpha_sa_mask): Prototype only if OPEN_VMS. (some_operand): Add default case. (input_operand): Likewise. (signed_comparison_operator): Likewise. (divmod_operator): Likewise. (alpha_set_memflags_1): Likewise. * reload1.c (reload_cse_simplify_operands): Ensure function always returns a value. * scan-decls.c (scan_decls): Likewise. * c-lex.c (skip_white_space): Fix typo in declaraion. * c-typeck.c (comp_target_types): Add parentheses around assignment used as truth value. (print_spelling): Likewise. (constructor_implicit, constructor_result): Remove unused variables. * collect2.c (scan_library): Protect prototype with #ifdef SCAN_LIBRARIES. * emit-rtl.c (find_line_note): Fix typo in declaration. * final.c (asm_insn_count): Protect prototype with #ifdef HAVE_ATTR_length. * flow.c (find_auto_inc): Protect prototype with #ifdef AUTO_INC_DEC. (try_pre_increment_1, try_pre_increment): Likewise. * regclass.c (auto_inc_dec_reg_p): Protect prototype with #ifdef FORBIDDEN_INC_DEC_CLASSES. Make return type explicit. * gcov-io.h (__store_long, __write_long, __read_long): Fix unsigned/signed comparisons. * gcov.c (read_files): Remove unused "first_type" variable. (scan _for_source_files): Initialize s_ptr. (function_summary): Eliminate "%lf" formatting, use %ld for longs. (output_data): Initialize branch_probs and last_line_num. Eliminate "%lf" formatting, use "%ld" for longs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@17158 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/scan-decls.c')
-rw-r--r--gcc/scan-decls.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/scan-decls.c b/gcc/scan-decls.c
index 253f3fc22b3..00dc83869ac 100644
--- a/gcc/scan-decls.c
+++ b/gcc/scan-decls.c
@@ -1,5 +1,5 @@
/* scan-decls.c - Extracts declarations from cpp output.
- Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1995, 1997 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 the
@@ -81,6 +81,7 @@ scan_decls (pfile, argc, argv)
char **argv;
{
int saw_extern, saw_inline;
+ int start_written;
int old_written;
/* If declarator_start is non-zero, it marks the start of the current
declarator. If it is zero, we are either still parsing the
@@ -91,6 +92,7 @@ scan_decls (pfile, argc, argv)
new_statement:
CPP_SET_WRITTEN (pfile, 0);
+ start_written = 0;
token = cpp_get_token (pfile);
handle_statement:
@@ -122,9 +124,6 @@ scan_decls (pfile, argc, argv)
declarator_start = 0;
for (;;)
{
- int start_written = CPP_WRITTEN (pfile);
- token = cpp_get_token (pfile);
- handle_token:
switch (token)
{
case CPP_LPAREN:
@@ -225,7 +224,7 @@ scan_decls (pfile, argc, argv)
}
}
else
- goto handle_token;
+ continue;
break;
}
/* This may be the name of a variable or function. */
@@ -234,7 +233,7 @@ scan_decls (pfile, argc, argv)
break;
case CPP_EOF:
- return; /* ??? FIXME */
+ return 0;
case CPP_LBRACE: case CPP_RBRACE: case CPP_DIRECTIVE:
goto new_statement; /* handle_statement? */
@@ -248,5 +247,8 @@ scan_decls (pfile, argc, argv)
default:
prev_id_start = 0;
}
+
+ start_written = CPP_WRITTEN (pfile);
+ token = cpp_get_token (pfile);
}
}