summaryrefslogtreecommitdiff
path: root/gcc/cccp.c
diff options
context:
space:
mode:
authorbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>1992-03-31 22:12:10 +0000
committerbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>1992-03-31 22:12:10 +0000
commit03506ec1edd22df7925714e9ca4a5d4c32ec0555 (patch)
tree3ea4752a98e7e910ed799d320005b5c7cb72240f /gcc/cccp.c
parent019a49c61029dde89feda499da570ec6e04861a0 (diff)
downloadgcc-03506ec1edd22df7925714e9ca4a5d4c32ec0555.tar.gz
*** empty log message ***
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@649 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cccp.c')
-rw-r--r--gcc/cccp.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/cccp.c b/gcc/cccp.c
index 54a95d27c29..979ad89f5ee 100644
--- a/gcc/cccp.c
+++ b/gcc/cccp.c
@@ -65,7 +65,6 @@ typedef unsigned char U_CHAR;
#include <signal.h>
#ifndef VMS
-#include <sys/file.h>
#ifndef USG
#include <sys/time.h> /* for __DATE__ and __TIME__ */
#include <sys/resource.h>
@@ -886,6 +885,7 @@ main (argc, argv)
char **pend_assertion_options = (char **) xmalloc (argc * sizeof (char *));
int inhibit_predefs = 0;
int no_standard_includes = 0;
+ int no_standard_cplusplus_includes = 0;
int missing_newline = 0;
/* Non-0 means don't output the preprocessed program. */
@@ -1266,6 +1266,9 @@ main (argc, argv)
/* -nostdinc causes no default include directories.
You must specify all include-file directories with -I. */
no_standard_includes = 1;
+ else if (!strcmp (argv[i], "-nostdinc++"))
+ /* -nostdinc++ causes no default C++-specific include directories. */
+ no_standard_cplusplus_includes = 1;
else if (!strcmp (argv[i], "-noprecomp"))
no_precomp = 1;
break;
@@ -1501,7 +1504,7 @@ main (argc, argv)
if (specd_prefix != 0 && default_len != 0)
for (p = include_defaults; p->fname; p++) {
/* Some standard dirs are only for C++. */
- if (!p->cplusplus || cplusplus) {
+ if (!p->cplusplus || (cplusplus && !no_standard_cplusplus_includes)) {
/* Does this dir start with the prefix? */
if (!strncmp (p->fname, default_prefix, default_len)) {
/* Yes; change prefix and add to search list. */
@@ -1533,7 +1536,7 @@ main (argc, argv)
/* Search ordinary names for GNU include directories. */
for (p = include_defaults; p->fname; p++) {
/* Some standard dirs are only for C++. */
- if (!p->cplusplus || cplusplus) {
+ if (!p->cplusplus || (cplusplus && !no_standard_cplusplus_includes)) {
struct file_name_list *new
= (struct file_name_list *) xmalloc (sizeof (struct file_name_list));
new->control_macro = 0;