aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpplib.c
diff options
context:
space:
mode:
authorZack Weinberg <zack@gcc.gnu.org>2000-04-20 19:33:11 +0000
committerZack Weinberg <zack@gcc.gnu.org>2000-04-20 19:33:11 +0000
commit1368ee700d0d2fd0f0c118e182dda14218dcff5b (patch)
treeb131b13cc8013ec316c7583f27a31866d32d9a99 /gcc/cpplib.c
parent70994f30394bd41eeb3173fcbd40b3db609cb445 (diff)
downloadgcc-1368ee700d0d2fd0f0c118e182dda14218dcff5b.zip
gcc-1368ee700d0d2fd0f0c118e182dda14218dcff5b.tar.gz
gcc-1368ee700d0d2fd0f0c118e182dda14218dcff5b.tar.bz2
cpplib.h (enum cpp_ttype): Add token types for all punctuators.
* cpplib.h (enum cpp_ttype): Add token types for all punctuators. Distinguish pp-numbers from valid C numbers. Give some tokens better names. Initialize from macro. (struct cpp_name, cpp_token, cpp_toklist): New data structures. Update prototypes. * cpplex.c (bump_column, expand_name_space, expand_token_space, init_token_list, cpp_output_list, _cpp_scan_line): New functions. (output_line_command): Add third argument, new line number. * cpphash.h: Update prototypes. * cppexp.c, cpphash.c, cpplib.c, scan-decls.c: Update for new token names. From-SVN: r33289
Diffstat (limited to 'gcc/cpplib.c')
-rw-r--r--gcc/cpplib.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/cpplib.c b/gcc/cpplib.c
index b42f6b6..fb6b770 100644
--- a/gcc/cpplib.c
+++ b/gcc/cpplib.c
@@ -377,7 +377,7 @@ do_define (pfile)
token = _cpp_get_directive_token (pfile);
if (token == CPP_VSPACE)
empty = 0; /* Empty definition of object like macro. */
- else if (token == CPP_LPAREN && ADJACENT_TO_MARK (pfile))
+ else if (token == CPP_OPEN_PAREN && ADJACENT_TO_MARK (pfile))
funlike = 1;
else if (ADJACENT_TO_MARK (pfile))
/* If this is an object-like macro, C99 requires white space after
@@ -688,11 +688,13 @@ do_line (pfile)
if (action_number == 1)
{
pfile->buffer_stack_depth++;
+ ip->system_header_p = 0;
read_line_number (pfile, &action_number);
}
else if (action_number == 2)
{
pfile->buffer_stack_depth--;
+ ip->system_header_p = 0;
read_line_number (pfile, &action_number);
}
if (action_number == 3)
@@ -1108,7 +1110,7 @@ detect_if_not_defined (pfile)
/* ...then an optional '(' and the name, */
token_offset = CPP_WRITTEN (pfile);
token = _cpp_get_directive_token (pfile);
- if (token == CPP_LPAREN)
+ if (token == CPP_OPEN_PAREN)
{
token_offset = CPP_WRITTEN (pfile);
need_rparen = 1;
@@ -1120,7 +1122,7 @@ detect_if_not_defined (pfile)
token_len = CPP_WRITTEN (pfile) - token_offset;
/* ...then the ')', if necessary, */
- if (need_rparen && _cpp_get_directive_token (pfile) != CPP_RPAREN)
+ if (need_rparen && _cpp_get_directive_token (pfile) != CPP_CLOSE_PAREN)
goto restore;
/* ...and make sure there's nothing else on the line. */