From 61cc82231be2c47c429b9b4ae8c18b3a4d13d12f Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 18 Apr 2009 21:25:07 +0100 Subject: [PATCH] directives.c (parse_include): Pass true to check_eol. libcpp: * directives.c (parse_include): Pass true to check_eol. gcc/testsuite: * gcc.dg/cpp/include5.c: New test. From-SVN: r146327 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.dg/cpp/include5.c | 9 +++++++++ libcpp/ChangeLog | 4 ++++ libcpp/directives.c | 2 +- 4 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.dg/cpp/include5.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 16197bc6e83..0ccc20a2246 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2009-04-18 Joseph Myers + + * gcc.dg/cpp/include5.c: New test. + 2009-04-18 Joseph Myers PR c/35210 diff --git a/gcc/testsuite/gcc.dg/cpp/include5.c b/gcc/testsuite/gcc.dg/cpp/include5.c new file mode 100644 index 00000000000..9bbc2878d05 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/include5.c @@ -0,0 +1,9 @@ +/* Test #include directives with macros expanding to empty. */ + +#define EMPTY_OBJ +#define EMPTY_FUNC() + +#include EMPTY_OBJ +#include EMPTY_FUNC() +#include "stddef.h" EMPTY_OBJ +#include "stddef.h" EMPTY_FUNC() diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index ab72fa61061..c4316caa334 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,7 @@ +2009-04-18 Joseph Myers + + * directives.c (parse_include): Pass true to check_eol. + 2009-04-18 Joseph Myers PR preprocessor/39646 diff --git a/libcpp/directives.c b/libcpp/directives.c index 9e26732337b..c2e71016f24 100644 --- a/libcpp/directives.c +++ b/libcpp/directives.c @@ -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