diff options
author | Zack Weinberg <zack@rabi.columbia.edu> | 1999-04-12 12:03:10 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 1999-04-12 12:03:10 +0000 |
commit | ed45de98388acec5ed80b3a664c05b8b43f842ab (patch) | |
tree | 2e0d76a1e5b4079159764fc03161a906466d6b74 /gcc/cpplib.h | |
parent | 802dbc34915da16c5fe637f54d1a18287eabb9d2 (diff) | |
download | gcc-ed45de98388acec5ed80b3a664c05b8b43f842ab.zip gcc-ed45de98388acec5ed80b3a664c05b8b43f842ab.tar.gz gcc-ed45de98388acec5ed80b3a664c05b8b43f842ab.tar.bz2 |
cpphash.c (collect_expansion, [...]): Make the escape character in macro buffers '\r', not '@'.
1999-04-12 14:55 -0400 Zack Weinberg <zack@rabi.columbia.edu>
* cpphash.c (collect_expansion, macroexpand,
push_macro_expansion): Make the escape character in macro
buffers '\r', not '@'. Remove code to protect literal
occurences of the escape character; '\r' cannot appear
in a macro buffer unless we put it there.
* cpplib.c (skip_comment, copy_comment, cpp_skip_hspace,
copy_rest_of_line, cpp_get_token, parse_string,
parse_assertion): '\r' might be a backslash-newline marker, or
it might be a macro escape marker, depending on
CPP_BUFFER (pfile)->has_escapes. '@' is not a special
character.
* cpplib.h: Update commentary.
From-SVN: r26371
Diffstat (limited to 'gcc/cpplib.h')
-rw-r--r-- | gcc/cpplib.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/gcc/cpplib.h b/gcc/cpplib.h index ccf8f92..bffd493 100644 --- a/gcc/cpplib.h +++ b/gcc/cpplib.h @@ -124,12 +124,17 @@ struct cpp_buffer char seen_eof; /* True if buffer contains escape sequences. - Currently there are three kinds: - "@-" means following identifier should not be macro-expanded. - "@ " means a token-separator. This turns into " " in final output + Currently there are two kinds: + "\r-" means following identifier should not be macro-expanded. + "\r " means a token-separator. This turns into " " in final output if not stringizing and needed to separate tokens; otherwise nothing. - "@@" means a normal '@'. - (An '@' inside a string stands for itself and is never an escape.) */ + Any other two-character sequence beginning with \r is an error. + + If this is NOT set, then \r is a one-character escape meaning backslash + newline. This is guaranteed not to occur in the middle of a token. + The two interpretations of \r do not conflict, because the two-character + escapes are used only in macro buffers, and backslash-newline is removed + from macro expansion text in collect_expansion and/or macarg. */ char has_escapes; }; |