cpplex.c (parse_string): Don't allow multiline strings in #include family directives.
authorNeil Booth <neilb@earthling.net>
Sat, 4 Nov 2000 11:13:22 +0000 (11:13 +0000)
committerNeil Booth <neil@gcc.gnu.org>
Sat, 4 Nov 2000 11:13:22 +0000 (11:13 +0000)
        * cpplex.c (parse_string): Don't allow multiline strings in
        #include family directives.

From-SVN: r37250

gcc/ChangeLog
gcc/cpplex.c

index aef2b9372dca4ea7f3ec6107df3732b199e3cc2b..ff755efa9a9e81c239116f59763c3f89f8d94e15 100644 (file)
@@ -1,3 +1,8 @@
+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
index 68ceb369770fd96c37e250bcd080bfdbdaf1f14e..86dbf5a692ddda55b88c5a93ec2f98408a63cfb4 100644 (file)
@@ -675,8 +675,8 @@ parse_string (pfile, token, terminator)
          /* Character constants and header names may not extend over
             multiple lines.  In Standard C, neither may strings.
             Unfortunately, we accept multiline strings as an
-            extension.  */
-         if (terminator != '"')
+            extension, except in #include family directives.  */
+         if (terminator != '"' || pfile->state.angled_headers)
            {
              unterminated (pfile, terminator);
              break;