summaryrefslogtreecommitdiff
path: root/gcc/c-lex.c
diff options
context:
space:
mode:
authoreggert <eggert@138bc75d-0d04-0410-961f-82ee72b054a4>1993-09-29 05:42:10 +0000
committereggert <eggert@138bc75d-0d04-0410-961f-82ee72b054a4>1993-09-29 05:42:10 +0000
commitee6d0b65a07a2dcb446ea67080b7850b1a955948 (patch)
tree2ad1ab53a3c48b891befe77f9e42083f78842d0c /gcc/c-lex.c
parentbfe0e25e79effe16e67a7c459996cc5b523a44db (diff)
downloadgcc-ee6d0b65a07a2dcb446ea67080b7850b1a955948.tar.gz
(ignore_escape_flag): Remove var.
(check_newline, yylex): Do not ignore escapes when reading file names, because escapes are the only way to represent file names containing '"'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5528 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-lex.c')
-rw-r--r--gcc/c-lex.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/gcc/c-lex.c b/gcc/c-lex.c
index fe59c1c130c..98a9f83b0e4 100644
--- a/gcc/c-lex.c
+++ b/gcc/c-lex.c
@@ -90,9 +90,6 @@ static int end_of_file;
static int nextchar = -1;
int check_newline ();
-
-/* Nonzero tells yylex to ignore \ in string constants. */
-static int ignore_escape_flag = 0;
/* C code produced by gperf version 2.5 (GNU C++ version) */
/* Command-line: gperf -p -j1 -i 1 -g -o -t -G -N is_reserved_word -k1,3,$ c-parse.gperf */
@@ -716,10 +713,8 @@ linenum:
/* More follows: it must be a string constant (filename). */
- /* Read the string constant, but don't treat \ as special. */
- ignore_escape_flag = 1;
+ /* Read the string constant. */
token = yylex ();
- ignore_escape_flag = 0;
if (token != STRING || TREE_CODE (yylval.ttype) != STRING_CST)
{
@@ -1938,8 +1933,7 @@ yylex ()
while (c != '"' && c >= 0)
{
- /* ignore_escape_flag is set for reading the filename in #line. */
- if (!ignore_escape_flag && c == '\\')
+ if (c == '\\')
{
int ignore = 0;
c = readescape (&ignore);