summaryrefslogtreecommitdiff
path: root/gcc/cppmacro.c
diff options
context:
space:
mode:
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-15 10:18:03 +0000
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-15 10:18:03 +0000
commit729d202287ec3a6291ee893585b188a25ceabfde (patch)
tree8e0d501bff80d035729518382d4a712cf34238c5 /gcc/cppmacro.c
parent5d91cd56a92bd29537b46c0bad34d45fb768f4e1 (diff)
downloadgcc-729d202287ec3a6291ee893585b188a25ceabfde.tar.gz
* cpphash.h (struct cpp_reader): Remove lexer_pos, directive_pos.
Split mlstring_pos into mls_line and mls_col. * cppinit.c (cpp_create_reader): Initialize line to 1. (cpp_destroy): Free tokenruns. (push_include): Don't update lexer_pos. * cpplex.c (unterminated, parse_string): Update. (lex_token): Don't update lexer_pos, update. * cpplib.c (if_stack): Save line instead of line + col. (start_directive, _cpp_do__Pragma, do_else, do_elif, push_conditional, _cpp_pop_buffer): Update. * cppmacro.c (funlike_invocation_p): Don't save lexer_pos. (_cpp_create_definition): Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45627 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cppmacro.c')
-rw-r--r--gcc/cppmacro.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/gcc/cppmacro.c b/gcc/cppmacro.c
index 61abc4a37d5..5c64767b656 100644
--- a/gcc/cppmacro.c
+++ b/gcc/cppmacro.c
@@ -605,9 +605,7 @@ funlike_invocation_p (pfile, node, list)
{
cpp_token maybe_paren;
macro_arg *args = 0;
- cpp_lexer_pos macro_pos;
- macro_pos = pfile->lexer_pos;
pfile->state.parsing_args = 1;
pfile->state.prevent_expansion++;
@@ -630,10 +628,6 @@ funlike_invocation_p (pfile, node, list)
pfile->state.parsing_args = 0;
pfile->keep_tokens--;
- /* Reset the position in case of failure. If success, the macro's
- expansion appears where the name would have. */
- pfile->lexer_pos = macro_pos;
-
if (args)
{
if (node->value.macro->paramc > 0)
@@ -1247,7 +1241,7 @@ _cpp_create_definition (pfile, node)
macro = (cpp_macro *) _cpp_pool_alloc (&pfile->macro_pool,
sizeof (cpp_macro));
- macro->line = pfile->directive_pos.line;
+ macro->line = pfile->directive_line;
macro->params = 0;
macro->paramc = 0;
macro->fun_like = 0;
@@ -1345,8 +1339,7 @@ _cpp_create_definition (pfile, node)
{
if (warn_of_redefinition (pfile, node, macro))
{
- cpp_pedwarn_with_line (pfile, pfile->directive_pos.line,
- pfile->directive_pos.col,
+ cpp_pedwarn_with_line (pfile, pfile->directive_line, 0,
"\"%s\" redefined", NODE_NAME (node));
if (node->type == NT_MACRO && !(node->flags & NODE_BUILTIN))