c-lex.c (indent_level): Remove.

* c-lex.c (indent_level): Remove.
	(cb_file_change, c_lex): Remove indent level handling.
	* c-lex.h (indent_level): Remove.
	* input.h (struct file_stack): Remove indent_level.
	* toplev.c (push_srcloc): Remove indent_level handling.
cp:
	* spew.c (yyungetc, snarf_block): Remove indent_level handling.

From-SVN: r53786
This commit is contained in:
Neil Booth 2002-05-23 12:05:38 +00:00 committed by Neil Booth
parent e275a53506
commit a97d139838
7 changed files with 13 additions and 28 deletions

View File

@ -1,3 +1,11 @@
2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
* c-lex.c (indent_level): Remove.
(cb_file_change, c_lex): Remove indent level handling.
* c-lex.h (indent_level): Remove.
* input.h (struct file_stack): Remove indent_level.
* toplev.c (push_srcloc): Remove indent_level handling.
2002-05-23 Jakub Jelinek <jakub@redhat.com>
PR target/6753

View File

@ -67,7 +67,6 @@ extern FILE *asm_out_file;
/* Number of bytes in a wide character. */
#define WCHAR_BYTES (WCHAR_TYPE_SIZE / BITS_PER_UNIT)
int indent_level; /* Number of { minus number of }. */
int pending_lang_change; /* If we need to switch languages - C++ only */
int c_header_level; /* depth in C headers - C++ only */
@ -271,7 +270,6 @@ cb_file_change (pfile, new_map)
lineno = included_at;
push_srcloc (new_map->to_file, 1);
input_file_stack->indent_level = indent_level;
(*debug_hooks->start_source_file) (included_at, new_map->to_file);
#ifndef NO_IMPLICIT_EXTERN_C
if (c_header_level)
@ -293,16 +291,6 @@ cb_file_change (pfile, new_map)
warning ("badly nested C headers from preprocessor");
--pending_lang_change;
}
#endif
#if 0
if (indent_level != input_file_stack->indent_level)
{
warning_with_file_and_line
(input_filename, lineno,
"this file contains more '%c's than '%c's",
indent_level > input_file_stack->indent_level ? '{' : '}',
indent_level > input_file_stack->indent_level ? '}' : '{');
}
#endif
pop_srcloc ();
@ -718,9 +706,6 @@ c_lex (value)
*value = NULL_TREE;
switch (tok->type)
{
case CPP_OPEN_BRACE: indent_level++; break;
case CPP_CLOSE_BRACE: indent_level--; break;
/* Issue this error here, where we can get at tok->val.c. */
case CPP_OTHER:
if (ISGRAPH (tok->val.c))

View File

@ -30,8 +30,6 @@ extern tree make_pointer_declarator PARAMS ((tree, tree));
extern int c_lex PARAMS ((tree *));
extern const char *init_c_lex PARAMS ((const char *));
extern int indent_level;
struct cpp_reader;
extern struct cpp_reader* parse_in;

View File

@ -1,3 +1,7 @@
2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
* spew.c (yyungetc, snarf_block): Remove indent_level handling.
2002-05-22 Richard Henderson <rth@redhat.com>
* decl.c (obscure_complex_init): Check for VAR_DECL

View File

@ -891,13 +891,6 @@ yyungetc (ch, rescan)
{
struct token fake;
/* If we're putting back a brace, undo the change in indent_level
from the first time we saw it. */
if (ch == '{')
indent_level--;
else if (ch == '}')
indent_level++;
fake.yychar = ch;
fake.yylval.ttype = 0;
fake.lineno = lineno;
@ -1085,8 +1078,7 @@ snarf_block (starting_file, starting_line)
size_t point;
if (yychar == '{')
/* We incremented indent_level in yylex; undo that. */
indent_level--;
;
else if (yychar == '=')
look_for_semicolon = 1;
else if (yychar == ':' || yychar == RETURN_KEYWORD || yychar == TRY)

View File

@ -36,7 +36,6 @@ struct file_stack
const char *name;
struct file_stack *next;
int line;
int indent_level;
};
/* Stack of currently pending input files.

View File

@ -2020,7 +2020,6 @@ push_srcloc (file, line)
fs = (struct file_stack *) xmalloc (sizeof (struct file_stack));
fs->name = input_filename = file;
fs->line = lineno = line;
fs->indent_level = 0;
fs->next = input_file_stack;
input_file_stack = fs;
input_file_stack_tick++;