aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpphash.h
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2002-06-18 06:27:40 +0000
committerNeil Booth <neil@gcc.gnu.org>2002-06-18 06:27:40 +0000
commitd97371e0249f5c29f306ffe9bebd555fa8fea3c9 (patch)
tree91cf53e07a5ce822aa18fc347d7f155a4deeee70 /gcc/cpphash.h
parent807b20b01ec236384e83cbed3b82241616a97880 (diff)
downloadgcc-d97371e0249f5c29f306ffe9bebd555fa8fea3c9.zip
gcc-d97371e0249f5c29f306ffe9bebd555fa8fea3c9.tar.gz
gcc-d97371e0249f5c29f306ffe9bebd555fa8fea3c9.tar.bz2
cpplib.c (dtable): Update.
* cpplib.c (dtable): Update. (end_directive): Decrement expansion prevention count. Clear state.in_expression. (prepare_directive_trad): Set state.in_expression. Increment expansion prevention count. * cpptrad.c (enum ls): New. (_cpp_overlay_buffer): Set overlaid_buffer. (_cpp_remove_overlay): Use overlaid_buffer. (_cpp_read_logcial_line_trad): Update buffer when it might have changed. (scan_out_logical_line): Handle state transitions for assertions and defined() in #if, and for funlike invocations including the directive case. Handle '<' and '>' as a quote mechanism in #include. Warn about unterminated macro invocations. * cpphash.h (struct lexer_state): New member in_expression. (struct cpp_reader): New member overlaid buffer. From-SVN: r54732
Diffstat (limited to 'gcc/cpphash.h')
-rw-r--r--gcc/cpphash.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cpphash.h b/gcc/cpphash.h
index 60340d9..98dfb49 100644
--- a/gcc/cpphash.h
+++ b/gcc/cpphash.h
@@ -211,6 +211,9 @@ struct lexer_state
/* Nonzero if in a directive that takes angle-bracketed headers. */
unsigned char angled_headers;
+ /* Nonzero if in a #if or #elif directive. */
+ unsigned char in_expression;
+
/* Nonzero to save comments. Turned off if discard_comments, and in
all directives apart from #define. */
unsigned char save_comments;
@@ -309,6 +312,9 @@ struct cpp_reader
/* Top of buffer stack. */
cpp_buffer *buffer;
+ /* Overlaid buffer (can be different after processing #include). */
+ cpp_buffer *overlaid_buffer;
+
/* Lexer state. */
struct lexer_state state;