mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
149ccdd45d
commit
61cc82231b
|
@ -1,3 +1,7 @@
|
||||||
|
2009-04-18 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
|
* gcc.dg/cpp/include5.c: New test.
|
||||||
|
|
||||||
2009-04-18 Joseph Myers <joseph@codesourcery.com>
|
2009-04-18 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
PR c/35210
|
PR c/35210
|
||||||
|
|
|
@ -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()
|
|
@ -1,3 +1,7 @@
|
||||||
|
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>
|
2009-04-18 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
PR preprocessor/39646
|
PR preprocessor/39646
|
||||||
|
|
|
@ -724,7 +724,7 @@ parse_include (cpp_reader *pfile, int *pangle_brackets,
|
||||||
/* This pragma allows extra tokens after the file name. */
|
/* This pragma allows extra tokens after the file name. */
|
||||||
}
|
}
|
||||||
else if (buf == NULL || CPP_OPTION (pfile, discard_comments))
|
else if (buf == NULL || CPP_OPTION (pfile, discard_comments))
|
||||||
check_eol (pfile, false);
|
check_eol (pfile, true);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* If we are not discarding comments, then gather them while
|
/* If we are not discarding comments, then gather them while
|
||||||
|
|
Loading…
Reference in New Issue