From 43612ffb67c38d7ff20507f62ae7f86b23f03ca4 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Sat, 18 May 2002 08:23:20 +0000 Subject: cppinit.c (cpp_post_options): If preprocessed, turn off traditional. * cppinit.c (cpp_post_options): If preprocessed, turn off traditional. If traditional, turn off column numbers. * cpplib.c (cpp_push_buffer): Lex from stage 3 if traditional. * cpptrad.c (handle_newline): Update line_base. (skip_comment): Handle -Wcomment. From-SVN: r53582 --- gcc/cppinit.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'gcc/cppinit.c') diff --git a/gcc/cppinit.c b/gcc/cppinit.c index 5d91005..dad255a 100644 --- a/gcc/cppinit.c +++ b/gcc/cppinit.c @@ -1774,9 +1774,16 @@ cpp_post_options (pfile) CPP_OPTION (pfile, warn_traditional) = 0; /* Permanently disable macro expansion if we are rescanning - preprocessed text. */ + preprocessed text. Read preprocesed source in ISO mode. */ if (CPP_OPTION (pfile, preprocessed)) - pfile->state.prevent_expansion = 1; + { + pfile->state.prevent_expansion = 1; + CPP_OPTION (pfile, traditional) = 0; + } + + /* Traditional CPP does not accurately track column information. */ + if (CPP_OPTION (pfile, traditional)) + CPP_OPTION (pfile, show_column) = 0; /* -dM makes no normal output. This is set here so that -dM -dD works as expected. */ -- cgit v1.1