diff options
author | Zack Weinberg <zack@gcc.gnu.org> | 2003-02-21 18:06:30 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2003-02-21 18:06:30 +0000 |
commit | a8d0ddaf4c62bdc34262be64de2161a413391b8d (patch) | |
tree | 4fb088465e0f2697e44b72ef804c30281053c4db /gcc/cppmacro.c | |
parent | 3a3f137e0de6ea3acab06f1b4b16ada378caec2b (diff) | |
download | gcc-a8d0ddaf4c62bdc34262be64de2161a413391b8d.zip gcc-a8d0ddaf4c62bdc34262be64de2161a413391b8d.tar.gz gcc-a8d0ddaf4c62bdc34262be64de2161a413391b8d.tar.bz2 |
cpphash.h (struct lexer_state): Add directive_wants_padding.
* cpphash.h (struct lexer_state): Add directive_wants_padding.
* cpplib.c (_cpp_handle_directive): Set directive_wants_padding
for directives of type INCL.
(glue_header_name, parse_include): Use get_token_no_padding.
* cppmacro.c (replace_args): If directive_wants_padding,
provide padding tokens.
* testsuite/gcc.dg/cpp/include3.c: New test.
* testsuite/gcc.dg/cpp/inc/foo.h: New file.
From-SVN: r63231
Diffstat (limited to 'gcc/cppmacro.c')
-rw-r--r-- | gcc/cppmacro.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cppmacro.c b/gcc/cppmacro.c index a00b835..99043ff 100644 --- a/gcc/cppmacro.c +++ b/gcc/cppmacro.c @@ -899,7 +899,7 @@ replace_args (pfile, node, macro, args) count = arg->expanded_count, from = arg->expanded; /* Padding on the left of an argument (unless RHS of ##). */ - if (!pfile->state.in_directive + if ((!pfile->state.in_directive || pfile->state.directive_wants_padding) && src != macro->exp.tokens && !(src[-1].flags & PASTE_LEFT)) *dest++ = padding_token (pfile, src); |