summaryrefslogtreecommitdiff
path: root/gcc/cpplex.c
diff options
context:
space:
mode:
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2000-11-11 13:19:01 +0000
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2000-11-11 13:19:01 +0000
commit3c7df4d37b46e7d453bc07ced88c3c0cdc8d94a9 (patch)
tree7323fe5e1674d601cd12b49ff890f231326528ee /gcc/cpplex.c
parente4ba638c604bc74878564fa597f74737956abb32 (diff)
downloadgcc-3c7df4d37b46e7d453bc07ced88c3c0cdc8d94a9.tar.gz
Remove CPP_PLACEMARKERs
* cppexp.c (lex): Don't handle CPP_PLACEMARKER. * cpplex.c (_cpp_lex_token): Rename skip_newlines to next_bol * cpplib.c (skip_rest_of_line, check_eol, cpp_push_buffer): Similarly. * cpplib.h: Remove CPP_PLACEMARKER. (struct lexer_state): Rename skip_newlines to next_bol. * cppmacro.c (stringify_arg): Don't handle CPP_PLACEMARKER. Simplify prev_white handling as a result. (paste_all_tokens): Don't worry about CPP_PLACEMARKERs. (parse_arg): Empty arguments are now empty, not CPP_PLACEMARKERs. (parse_args): Similarly. Update argument count tests. (enter_macro_context): Return 2 to indicate an empty macro. (replace_args): Don't bother pre-expanding an empty argument. Handle placemarkers and ## extension during pre-expansion. (cpp_get_token): Handle empty macro expansions. Don't worry about CPP_PLACEMARKERs. (_cpp_create_definition): Empty macros are now empty. (cpp_macro_defintion): Don't special case empty macros. * scan-decls.c: Don't bother with CPP_PLACEMARKERs. * c-lex.c: Similarly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37385 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpplex.c')
-rw-r--r--gcc/cpplex.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/cpplex.c b/gcc/cpplex.c
index 9aff13d82b2..5c7edcd40fe 100644
--- a/gcc/cpplex.c
+++ b/gcc/cpplex.c
@@ -846,11 +846,11 @@ _cpp_lex_token (pfile, result)
cppchar_t c;
cpp_buffer *buffer;
const unsigned char *comment_start;
- unsigned char bol = pfile->state.skip_newlines;
+ unsigned char bol = pfile->state.next_bol;
done_directive:
buffer = pfile->buffer;
- pfile->state.skip_newlines = 0;
+ pfile->state.next_bol = 0;
result->flags = 0;
next_char:
pfile->lexer_pos.line = buffer->lineno;
@@ -873,7 +873,7 @@ _cpp_lex_token (pfile, result)
line and _Pragma buffers. */
if (pfile->lexer_pos.col != 0 && !buffer->from_stage3)
cpp_pedwarn (pfile, "no newline at end of file");
- pfile->state.skip_newlines = 1;
+ pfile->state.next_bol = 1;
result->type = CPP_EOF;
break;
@@ -900,7 +900,7 @@ _cpp_lex_token (pfile, result)
/* Don't let directives spill over to the next line. */
buffer->read_ahead = c;
- pfile->state.skip_newlines = 1;
+ pfile->state.next_bol = 1;
result->type = CPP_EOF;
break;
@@ -1186,7 +1186,7 @@ _cpp_lex_token (pfile, result)
/* Put a '#' in lookahead, return CPP_EOF for parse_arg. */
buffer->extra_char = buffer->read_ahead;
buffer->read_ahead = '#';
- pfile->state.skip_newlines = 1;
+ pfile->state.next_bol = 1;
result->type = CPP_EOF;
/* Get whitespace right - newline_in_args sets it. */