From 29b10746ab46f5901534d712d6108f219aceff97 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Mon, 13 Nov 2000 18:40:37 +0000 Subject: cpplex.c (_cpp_lex_token): CPP_COMMENT and true CPP_EOF cases return without MI check. * cpplex.c (_cpp_lex_token): CPP_COMMENT and true CPP_EOF cases return without MI check. * cpplib.c (do_diagnostic): Take boolean of whether to print the directive name. (do_error, do_warning): Update. (do_pragma_dependency): Use it. * cpplib.h (VARARGS_FIRST): Delete. (struct cpp_token): Delete integer. * cppmacro.c (enter_macro_context): Move disabled check to _cpp_get_token. (_cpp_get_token): Simplify into a single loop. From-SVN: r37434 --- gcc/cpplex.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'gcc/cpplex.c') diff --git a/gcc/cpplex.c b/gcc/cpplex.c index 75d094d..8717104 100644 --- a/gcc/cpplex.c +++ b/gcc/cpplex.c @@ -876,7 +876,8 @@ _cpp_lex_token (pfile, result) pfile->state.next_bol = 1; pfile->skipping = 0; /* In case missing #endif. */ result->type = CPP_EOF; - break; + /* Don't do MI optimisation. */ + return; case ' ': case '\t': case '\f': case '\v': case '\0': skip_whitespace (pfile, c); @@ -1032,7 +1033,8 @@ _cpp_lex_token (pfile, result) /* Save the comment as a token in its own right. */ save_comment (pfile, result, comment_start); - break; + /* Don't do MI optimisation. */ + return; case '<': if (pfile->state.angled_headers) @@ -1272,10 +1274,8 @@ _cpp_lex_token (pfile, result) break; } - /* Non-comment tokens invalidate any controlling macros. */ - if (result->type != CPP_COMMENT - && result->type != CPP_EOF - && !pfile->state.in_directive) + /* If not in a directive, this token invalidates controlling macros. */ + if (!pfile->state.in_directive) pfile->mi_state = MI_FAILED; } -- cgit v1.1