aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppinit.c
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2002-05-18 08:23:20 +0000
committerNeil Booth <neil@gcc.gnu.org>2002-05-18 08:23:20 +0000
commit43612ffb67c38d7ff20507f62ae7f86b23f03ca4 (patch)
tree8d676f8eb309246fd73a05fd979264ce2b405f0e /gcc/cppinit.c
parentc810846eb0ab7c2a6d614b0ec8b2a0905c3fd0ad (diff)
downloadgcc-43612ffb67c38d7ff20507f62ae7f86b23f03ca4.zip
gcc-43612ffb67c38d7ff20507f62ae7f86b23f03ca4.tar.gz
gcc-43612ffb67c38d7ff20507f62ae7f86b23f03ca4.tar.bz2
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
Diffstat (limited to 'gcc/cppinit.c')
-rw-r--r--gcc/cppinit.c11
1 files changed, 9 insertions, 2 deletions
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. */