summaryrefslogtreecommitdiffstats
path: root/gcc/cpplib.h
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>1999-04-12 12:03:10 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>1999-04-12 12:03:10 +0000
commitb8f0cc2d96769bbe14fba8469cf4a669b2fcdd2a (patch)
tree2e0d76a1e5b4079159764fc03161a906466d6b74 /gcc/cpplib.h
parent6e4a6ed9e8538b1ca3c7a63502f587110fb7a858 (diff)
downloadppe42-gcc-b8f0cc2d96769bbe14fba8469cf4a669b2fcdd2a.tar.gz
ppe42-gcc-b8f0cc2d96769bbe14fba8469cf4a669b2fcdd2a.zip
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26371 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpplib.h')
-rw-r--r--gcc/cpplib.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/gcc/cpplib.h b/gcc/cpplib.h
index ccf8f929642..bffd493232f 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;
};
OpenPOWER on IntegriCloud