From b8f0cc2d96769bbe14fba8469cf4a669b2fcdd2a Mon Sep 17 00:00:00 2001 From: zack Date: Mon, 12 Apr 1999 12:03:10 +0000 Subject: 1999-04-12 14:55 -0400 Zack Weinberg * 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 --- gcc/cpplib.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'gcc/cpplib.h') 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; }; -- cgit v1.2.1