Commit 16eb2788 by Neil Booth Committed by Neil Booth

cpplex.c (parse_string): Don't allow multiline strings in #include family directives.

        * cpplex.c (parse_string): Don't allow multiline strings in
        #include family directives.

From-SVN: r37250
parent 9232b7d9
2000-11-04 Neil Booth <neilb@earthling.net> 2000-11-04 Neil Booth <neilb@earthling.net>
* cpplex.c (parse_string): Don't allow multiline strings in
#include family directives.
2000-11-04 Neil Booth <neilb@earthling.net>
* cpplib.c (do_line): Only warn pedantically if not reading * cpplib.c (do_line): Only warn pedantically if not reading
preprocessed input. preprocessed input.
......
...@@ -675,8 +675,8 @@ parse_string (pfile, token, terminator) ...@@ -675,8 +675,8 @@ parse_string (pfile, token, terminator)
/* Character constants and header names may not extend over /* Character constants and header names may not extend over
multiple lines. In Standard C, neither may strings. multiple lines. In Standard C, neither may strings.
Unfortunately, we accept multiline strings as an Unfortunately, we accept multiline strings as an
extension. */ extension, except in #include family directives. */
if (terminator != '"') if (terminator != '"' || pfile->state.angled_headers)
{ {
unterminated (pfile, terminator); unterminated (pfile, terminator);
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment