OSDN Git Service

libcpp:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 18 Apr 2009 20:25:07 +0000 (20:25 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 18 Apr 2009 20:25:07 +0000 (20:25 +0000)
* directives.c (parse_include): Pass true to check_eol.

gcc/testsuite:
* gcc.dg/cpp/include5.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146327 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/cpp/include5.c [new file with mode: 0644]
libcpp/ChangeLog
libcpp/directives.c

index 16197bc..0ccc20a 100644 (file)
@@ -1,5 +1,9 @@
 2009-04-18  Joseph Myers  <joseph@codesourcery.com>
 
+       * gcc.dg/cpp/include5.c: New test.
+
+2009-04-18  Joseph Myers  <joseph@codesourcery.com>
+
        PR c/35210
        * gcc.dg/call-diag-2.c: New test.
 
diff --git a/gcc/testsuite/gcc.dg/cpp/include5.c b/gcc/testsuite/gcc.dg/cpp/include5.c
new file mode 100644 (file)
index 0000000..9bbc287
--- /dev/null
@@ -0,0 +1,9 @@
+/* Test #include directives with macros expanding to empty.  */
+
+#define EMPTY_OBJ
+#define EMPTY_FUNC()
+
+#include <stddef.h> EMPTY_OBJ
+#include <stddef.h> EMPTY_FUNC()
+#include "stddef.h" EMPTY_OBJ
+#include "stddef.h" EMPTY_FUNC()
index ab72fa6..c4316ca 100644 (file)
@@ -1,5 +1,9 @@
 2009-04-18  Joseph Myers  <joseph@codesourcery.com>
 
+       * directives.c (parse_include): Pass true to check_eol.
+
+2009-04-18  Joseph Myers  <joseph@codesourcery.com>
+
        PR preprocessor/39646
        * include/line-map.h (enum lc_reason): Add LC_RENAME_VERBATIM.
        * line-map.c (linemap_add): Handle LC_RENAME_VERBATIM.
index 9e26732..c2e7101 100644 (file)
@@ -724,7 +724,7 @@ parse_include (cpp_reader *pfile, int *pangle_brackets,
       /* This pragma allows extra tokens after the file name.  */
     }
   else if (buf == NULL || CPP_OPTION (pfile, discard_comments))
-    check_eol (pfile, false);
+    check_eol (pfile, true);
   else
     {
       /* If we are not discarding comments, then gather them while