aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-02-27 19:09:40 +0000
committerRichard Stallman <rms@gnu.org>1993-02-27 19:09:40 +0000
commit5b450ae52870699823d0a64361d4dfb61fa8a99e (patch)
treec99a228c8c5d701f3e7e8621112b5e14d6ad299c /gcc
parent89d7540d7bd16a0b664be710db1159f5e8763572 (diff)
downloadgcc-5b450ae52870699823d0a64361d4dfb61fa8a99e.zip
gcc-5b450ae52870699823d0a64361d4dfb61fa8a99e.tar.gz
gcc-5b450ae52870699823d0a64361d4dfb61fa8a99e.tar.bz2
(check_newline): #line updates input_file_stack->name.
From-SVN: r3556
Diffstat (limited to 'gcc')
-rw-r--r--gcc/c-lex.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/c-lex.c b/gcc/c-lex.c
index 89d405f..111cf92 100644
--- a/gcc/c-lex.c
+++ b/gcc/c-lex.c
@@ -659,7 +659,13 @@ linenum:
while (c == ' ' || c == '\t')
c = getc (finput);
if (c == '\n')
- return c;
+ {
+ /* Update the name in the top element of input_file_stack. */
+ if (input_file_stack)
+ input_file_stack->name = input_filename;
+
+ return c;
+ }
ungetc (c, finput);
token = yylex ();
@@ -711,6 +717,11 @@ linenum:
}
}
+ /* Now that we've pushed or popped the input stack,
+ update the name in the top element. */
+ if (input_file_stack)
+ input_file_stack->name = input_filename;
+
/* If we have handled a `1' or a `2',
see if there is another number to read. */
if (used_up)