summaryrefslogtreecommitdiffstats
path: root/gcc/cppfiles.c
diff options
context:
space:
mode:
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-29 17:27:57 +0000
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-29 17:27:57 +0000
commitfa233610fcbee7f3e67375962e6effe96c2b19e2 (patch)
treeae3bf4ef61f7e71d609b714e200c82e7e441cba2 /gcc/cppfiles.c
parent4d1f4307480c700e251e01b4931f8935db4a04cc (diff)
downloadppe42-gcc-fa233610fcbee7f3e67375962e6effe96c2b19e2.tar.gz
ppe42-gcc-fa233610fcbee7f3e67375962e6effe96c2b19e2.zip
* cppexp.c (parse_defined): Always record the macro name.
(lex): Don't worry about identifiers, or special-case CPP_NOT here. (_cpp_parse_expr): Figure out at the end of the routine whether we saw a valid !defined() expression. * cppfiles.c (stack_include_file): Update for mi_valid. (_cpp_pop_file_buffer): Similarly. * cpplex.c (_cpp_lex_token): Similarly. * cpphash.h (enum mi_state, enum mi_ind, mi_state, mi_if_not_defined, mi_lexed): Remove. (mi_valid): New. * cpplib.c (do_if): Simplify. (do_endif, push_conditional, _cpp_handle_directive): Update for renaming of mi_state to mi_valid. * cpp.texi: Add index entries for digraphs, and add comment that C++ refers to them as alternative tokens. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44459 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cppfiles.c')
-rw-r--r--gcc/cppfiles.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/cppfiles.c b/gcc/cppfiles.c
index 137882b340c..cb6ca5eda73 100644
--- a/gcc/cppfiles.c
+++ b/gcc/cppfiles.c
@@ -332,7 +332,7 @@ stack_include_file (pfile, inc)
fp->sysp = sysp;
/* Initialise controlling macro state. */
- pfile->mi_state = MI_OUTSIDE;
+ pfile->mi_valid = true;
pfile->mi_cmacro = 0;
pfile->include_depth++;
@@ -748,12 +748,12 @@ _cpp_pop_file_buffer (pfile, buf)
pfile->include_depth--;
/* Record the inclusion-preventing macro, which could be NULL
- meaning no controlling macro, if we haven't got it already. */
- if (pfile->mi_state == MI_OUTSIDE && inc->cmacro == NULL)
+ meaning no controlling macro. */
+ if (pfile->mi_valid && inc->cmacro == NULL)
inc->cmacro = pfile->mi_cmacro;
/* Invalidate control macros in the #including file. */
- pfile->mi_state = MI_FAILED;
+ pfile->mi_valid = false;
inc->refcnt--;
if (inc->refcnt == 0 && DO_NOT_REREAD (inc))
OpenPOWER on IntegriCloud