diff options
Diffstat (limited to 'gcc/incpath.c')
-rw-r--r-- | gcc/incpath.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/incpath.c b/gcc/incpath.c index 8437939..14593a1 100644 --- a/gcc/incpath.c +++ b/gcc/incpath.c @@ -137,7 +137,8 @@ add_standard_paths (const char *sysroot, const char *iprefix, IPREFIX and search them first. */ for (p = cpp_include_defaults; p->fname; p++) { - if (!p->cplusplus || cxx_stdinc) + if (p->cplusplus == 0 + || (cxx_stdinc && (p->cplusplus == flag_stdlib_kind))) { /* Should we be translating sysrooted dirs too? Assume that iprefix and sysroot are mutually exclusive, for @@ -168,7 +169,8 @@ add_standard_paths (const char *sysroot, const char *iprefix, for (p = cpp_include_defaults; p->fname; p++) { - if (!p->cplusplus || cxx_stdinc) + if (p->cplusplus == 0 + || (cxx_stdinc && (p->cplusplus == flag_stdlib_kind))) { char *str; |