summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2002-05-23 12:05:38 +0000
committerNeil Booth <neil@gcc.gnu.org>2002-05-23 12:05:38 +0000
commita97d1398381199317a5627d7a24e407284ef1e2e (patch)
tree57ba86ec8f6a73bd6aafd40db3b51f242e817215
parente275a5350601fb2218ad553bb2029b03faf6c7f3 (diff)
downloadgcc-a97d1398381199317a5627d7a24e407284ef1e2e.tar.gz
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
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/c-lex.c15
-rw-r--r--gcc/c-lex.h2
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/spew.c10
-rw-r--r--gcc/input.h1
-rw-r--r--gcc/toplev.c1
7 files changed, 13 insertions, 28 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3e19e618b68..9da36a96634 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/c-lex.c b/gcc/c-lex.c
index 357017c9ca0..7e82b0363ac 100644
--- a/gcc/c-lex.c
+++ b/gcc/c-lex.c
@@ -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)
@@ -294,16 +292,6 @@ cb_file_change (pfile, new_map)
--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 ();
(*debug_hooks->end_source_file) (to_line);
@@ -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))
diff --git a/gcc/c-lex.h b/gcc/c-lex.h
index aa3d333f4f2..51538ab5ebf 100644
--- a/gcc/c-lex.h
+++ b/gcc/c-lex.h
@@ -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;
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 346add8059c..60591ed4385 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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
diff --git a/gcc/cp/spew.c b/gcc/cp/spew.c
index 9607e975f11..0d555fca067 100644
--- a/gcc/cp/spew.c
+++ b/gcc/cp/spew.c
@@ -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)
diff --git a/gcc/input.h b/gcc/input.h
index 7ef5d941dcb..28bb6481832 100644
--- a/gcc/input.h
+++ b/gcc/input.h
@@ -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.
diff --git a/gcc/toplev.c b/gcc/toplev.c
index f465adc1d44..fc4f658c62b 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -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++;