summaryrefslogtreecommitdiff
path: root/gcc/cppinit.c
diff options
context:
space:
mode:
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-18 08:23:20 +0000
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-18 08:23:20 +0000
commitca52ef607be049bd775a725f6d77eaf554bfb2b0 (patch)
tree8d676f8eb309246fd73a05fd979264ce2b405f0e /gcc/cppinit.c
parent02bfdd71cd1ebcfa2eb39072ecd7e8b7aefae2e4 (diff)
downloadgcc-ca52ef607be049bd775a725f6d77eaf554bfb2b0.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53582 138bc75d-0d04-0410-961f-82ee72b054a4
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 5d91005755c..dad255aca8c 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. */