summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-02 06:54:46 +0000
committerbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-02 06:54:46 +0000
commit30eb963b5f1fe5bd52255805f736b96fd50193c4 (patch)
tree6ced526dc77310f01212932e76657af35afe968b
parentf2f543a372584d4890fa89b988b4f753ddb3f811 (diff)
downloadppe42-gcc-30eb963b5f1fe5bd52255805f736b96fd50193c4.tar.gz
ppe42-gcc-30eb963b5f1fe5bd52255805f736b96fd50193c4.zip
* c-lex.c (src_line): Remove unneeded static variable.
(cb_line_change): Set input_line directly, instead of src_line. (get_non_padding_token): We no longer need to compensate for the "horrible things" the C++ front-end does with the current line number, git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72010 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/c-lex.c10
2 files changed, 8 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 367a2694dc2..3bad4170169 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2003-10-01 Per Bothner <pbothner@apple.com>
+
+ * c-lex.c (src_line): Remove unneeded static variable.
+ (cb_line_change): Set input_line directly, instead of src_line.
+ (get_non_padding_token): We no longer need to compensate for the
+ "horrible things" the C++ front-end does with the current line number,
+
2003-10-01 Zack Weinberg <zack@codesourcery.com>
* target.h (init_libfuncs): New hook.
diff --git a/gcc/c-lex.c b/gcc/c-lex.c
index 2109eff1da9..f3cdd3cffb0 100644
--- a/gcc/c-lex.c
+++ b/gcc/c-lex.c
@@ -45,9 +45,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
/* The current line map. */
static const struct line_map *map;
-/* The line used to refresh the lineno global variable after each token. */
-static unsigned int src_lineno;
-
/* We may keep statistics about how long which files took to compile. */
static int header_time, body_time;
static splay_tree file_info_tree;
@@ -202,7 +199,7 @@ cb_line_change (cpp_reader *pfile ATTRIBUTE_UNUSED, const cpp_token *token,
if (token->type == CPP_EOF || parsing_args)
return;
- src_lineno = SOURCE_LINE (map, token->line);
+ input_line = SOURCE_LINE (map, token->line);
}
static void
@@ -317,11 +314,6 @@ get_nonpadding_token (void)
while (tok->type == CPP_PADDING);
timevar_pop (TV_CPP);
- /* The C++ front end does horrible things with the current line
- number. To ensure an accurate line number, we must reset it
- every time we advance a token. */
- input_line = src_lineno;
-
return tok;
}
OpenPOWER on IntegriCloud