diff options
author | Neil Booth <neil@daikokuya.demon.co.uk> | 2001-09-16 11:23:56 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2001-09-16 11:23:56 +0000 |
commit | 18a9d8ff7f06fbdc3ea635c8d55ea4023bad0dd8 (patch) | |
tree | b5637b92895c1d89a6ebec87518678bddc00a55f /gcc/cppmain.c | |
parent | 27553bf3253625f6c3e56d36599b9e7cf188bfe8 (diff) | |
download | gcc-18a9d8ff7f06fbdc3ea635c8d55ea4023bad0dd8.zip gcc-18a9d8ff7f06fbdc3ea635c8d55ea4023bad0dd8.tar.gz gcc-18a9d8ff7f06fbdc3ea635c8d55ea4023bad0dd8.tar.bz2 |
cppmain.c (scan_translation_unit): Don't worry about putting a space after hashes.
* cppmain.c (scan_translation_unit): Don't worry about
putting a space after hashes.
* cpplib.c (directive_diagnostics): New.
(_cpp_handle_directive): Update to use directive_diagnostics.
(run_directive): Don't toggle prevent_expansion.
(do_line): Backup in case of the line extension.
* cpplib.h (cpp_lexer_pos): Remove.
* cppmacro.c (_cpp_create_definition): Precede a leading #
with whitespace.
* gcc.dg/cpp/line5.c: New testcase.
From-SVN: r45645
Diffstat (limited to 'gcc/cppmain.c')
-rw-r--r-- | gcc/cppmain.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/gcc/cppmain.c b/gcc/cppmain.c index 18bd7fd..5451ccc 100644 --- a/gcc/cppmain.c +++ b/gcc/cppmain.c @@ -233,13 +233,6 @@ scan_translation_unit (pfile) if ((token->flags & (PREV_WHITE | AVOID_LPASTE | BOL)) == AVOID_LPASTE && cpp_avoid_paste (pfile, &tokens[1 - index], token)) token->flags |= PREV_WHITE; - /* Special case '# <directive name>': insert a space between - the # and the token. This will prevent it from being - treated as a directive when this code is re-preprocessed. - XXX Should do this only at the beginning of a line, but how? */ - else if (token->type == CPP_NAME && token->val.node->directive_index - && tokens[1 - index].type == CPP_HASH) - token->flags |= PREV_WHITE; cpp_output_token (token, print.outf); if (token->type == CPP_STRING || token->type == CPP_WSTRING |