summaryrefslogtreecommitdiffstats
path: root/gcc/cppinit.c
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2001-05-10 00:07:23 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2001-05-10 00:07:23 +0000
commit946ce1b70473e06c40af6817c28521213af2fb8d (patch)
treedbbe9eb784b1862db1081f71d85145cf0a696198 /gcc/cppinit.c
parente67abcc992189883a074e23f227f5b20ea5de814 (diff)
downloadppe42-gcc-946ce1b70473e06c40af6817c28521213af2fb8d.tar.gz
ppe42-gcc-946ce1b70473e06c40af6817c28521213af2fb8d.zip
* cppinit.c (cpp_post_options): Shut off macro expansion if
-fpreprocessed. * cpplib.c (_cpp_handle_directive): If -fpreprocessed, accept IN_I directives only if the # is in column 1 and the directive name begins in column 2. * cppmain.c (scan_buffer): Insert a space between # and an identifier, when that identifier is a directive name. * tradcpp.c (struct file_buf): Add a pointer to the next entry in the header search path. (enum node_type): Add T_INCLUDE_NEXT. (directive_table): Add entry for include_next. (do_include_next): New function. (process_include): New routine, broken out of do_include. (finclude): Insert 'nhd' argument, to be copied into next_header_dir of the new buffer. (main): Adjust to match. * gsyslimits.h, limity.h: Un-indent #include_next. testsuite: * gcc.dg/cpp/direct2.c: New test. * gcc.dg/cpp/direct2s.c: New test. * gcc.c-torture/execute/920730-1t.c: #undef __GNUC__ at head. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41932 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cppinit.c')
-rw-r--r--gcc/cppinit.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cppinit.c b/gcc/cppinit.c
index 980cdb1df42..fc15db4451a 100644
--- a/gcc/cppinit.c
+++ b/gcc/cppinit.c
@@ -1716,6 +1716,11 @@ cpp_post_options (pfile)
if (CPP_OPTION (pfile, user_label_prefix) == NULL)
CPP_OPTION (pfile, user_label_prefix) = USER_LABEL_PREFIX;
+ /* Permanently disable macro expansion if we are rescanning
+ preprocessed text. */
+ if (CPP_OPTION (pfile, preprocessed))
+ pfile->state.prevent_expansion = 1;
+
/* We need to do this after option processing and before
cpp_start_read, as cppmain.c relies on the options->no_output to
set its callbacks correctly before calling cpp_start_read. */
OpenPOWER on IntegriCloud