From cbccf5e80325d6d1289675160e858f2d89662a21 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Tue, 18 Apr 2000 18:52:16 +0000 Subject: [PATCH] cpplex.c (_cpp_lex_token): Don't call CPP_BUMP_LINE when the mark is active. * cpplex.c (_cpp_lex_token): Don't call CPP_BUMP_LINE when the mark is active. From-SVN: r33228 --- gcc/ChangeLog | 5 +++++ gcc/cpplex.c | 3 ++- gcc/testsuite/g++.old-deja/g++.other/lineno4.C | 7 +++++++ 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/g++.old-deja/g++.other/lineno4.C diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7c53d5b9fcb..0ba9d8b55be 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-04-18 Mark Mitchell + + * cpplex.c (_cpp_lex_token): Don't call CPP_BUMP_LINE when the + mark is active. + Tue Apr 18 14:16:47 2000 Richard Kenner * c-decl.c (mark_binding_level): Use 'for' instead of `while'. diff --git a/gcc/cpplex.c b/gcc/cpplex.c index 1340b9c0b21..06bee994de9 100644 --- a/gcc/cpplex.c +++ b/gcc/cpplex.c @@ -1218,7 +1218,8 @@ _cpp_lex_token (pfile) else { /* Backslash newline is ignored. */ - CPP_BUMP_LINE (pfile); + if (!ACTIVE_MARK_P (pfile)) + CPP_BUMP_LINE (pfile); goto get_next; } diff --git a/gcc/testsuite/g++.old-deja/g++.other/lineno4.C b/gcc/testsuite/g++.old-deja/g++.other/lineno4.C new file mode 100644 index 00000000000..9767262e442 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/lineno4.C @@ -0,0 +1,7 @@ +// Build don't link: + +#define x \ + y + +int; // ERROR - invalid declaration +