aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.4.0/libcpp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.4.0/libcpp')
-rw-r--r--gcc-4.4.0/libcpp/directives.c4
-rw-r--r--gcc-4.4.0/libcpp/files.c25
-rw-r--r--gcc-4.4.0/libcpp/include/cpplib.h4
-rw-r--r--gcc-4.4.0/libcpp/macro.c2
4 files changed, 26 insertions, 9 deletions
diff --git a/gcc-4.4.0/libcpp/directives.c b/gcc-4.4.0/libcpp/directives.c
index ca7d052fa..ec976bfd1 100644
--- a/gcc-4.4.0/libcpp/directives.c
+++ b/gcc-4.4.0/libcpp/directives.c
@@ -150,11 +150,11 @@ D(error, T_ERROR, STDC89, 0) /* 475 */ \
D(pragma, T_PRAGMA, STDC89, IN_I) /* 195 */ \
D(warning, T_WARNING, EXTENSION, 0) /* 22 */ \
D(include_next, T_INCLUDE_NEXT, EXTENSION, INCL | EXPAND) /* 19 */ \
-D(ident, T_IDENT, EXTENSION, IN_I | DEPRECATED) /* 11 */ \
+D(ident, T_IDENT, EXTENSION, IN_I) /* 11 */ \
D(import, T_IMPORT, EXTENSION, INCL | EXPAND) /* 0 ObjC */ \
D(assert, T_ASSERT, EXTENSION, DEPRECATED) /* 0 SVR4 */ \
D(unassert, T_UNASSERT, EXTENSION, DEPRECATED) /* 0 SVR4 */ \
-D(sccs, T_SCCS, EXTENSION, IN_I | DEPRECATED) /* 0 SVR4? */
+D(sccs, T_SCCS, EXTENSION, IN_I) /* 0 SVR4? */
/* #sccs is synonymous with #ident. */
#define do_sccs do_ident
diff --git a/gcc-4.4.0/libcpp/files.c b/gcc-4.4.0/libcpp/files.c
index 6ad83b934..93e343308 100644
--- a/gcc-4.4.0/libcpp/files.c
+++ b/gcc-4.4.0/libcpp/files.c
@@ -934,15 +934,28 @@ open_file_failed (cpp_reader *pfile, _cpp_file *file, int angle_brackets)
errno = file->err_no;
if (print_dep && CPP_OPTION (pfile, deps.missing_files) && errno == ENOENT)
- deps_add_dep (pfile->deps, file->name);
+ {
+ deps_add_dep (pfile->deps, file->name);
+ /* If the preprocessor output (other than dependency information) is
+ being used, we must also flag an error. */
+ if (CPP_OPTION (pfile, deps.need_preprocessor_output))
+ cpp_errno (pfile, CPP_DL_ERROR, file->path);
+ }
else
{
- /* If we are outputting dependencies but not for this file then
- don't error because we can still produce correct output. */
- if (CPP_OPTION (pfile, deps.style) && ! print_dep)
- cpp_errno (pfile, CPP_DL_WARNING, file->path);
- else
+ /* If we are not outputting dependencies, or if we are and dependencies
+ were requested for this file, or if preprocessor output is needed
+ in addition to dependency information, this is an error.
+
+ Otherwise (outputting dependencies but not for this file, and not
+ using the preprocessor output), we can still produce correct output
+ so it's only a warning. */
+ if (CPP_OPTION (pfile, deps.style) == DEPS_NONE
+ || print_dep
+ || CPP_OPTION (pfile, deps.need_preprocessor_output))
cpp_errno (pfile, CPP_DL_ERROR, file->path);
+ else
+ cpp_errno (pfile, CPP_DL_WARNING, file->path);
}
}
diff --git a/gcc-4.4.0/libcpp/include/cpplib.h b/gcc-4.4.0/libcpp/include/cpplib.h
index a29dbea8f..a0ffe0b9f 100644
--- a/gcc-4.4.0/libcpp/include/cpplib.h
+++ b/gcc-4.4.0/libcpp/include/cpplib.h
@@ -432,6 +432,10 @@ struct cpp_options
/* If true, no dependency is generated on the main file. */
bool ignore_main_file;
+
+ /* If true, intend to use the preprocessor output (e.g., for compilation)
+ in addition to the dependency info. */
+ bool need_preprocessor_output;
} deps;
/* Target-specific features set by the front end or client. */
diff --git a/gcc-4.4.0/libcpp/macro.c b/gcc-4.4.0/libcpp/macro.c
index a7b7d9e31..d74b80fad 100644
--- a/gcc-4.4.0/libcpp/macro.c
+++ b/gcc-4.4.0/libcpp/macro.c
@@ -375,7 +375,7 @@ stringify_arg (cpp_reader *pfile, macro_arg *arg)
}
escape_it = (token->type == CPP_STRING || token->type == CPP_CHAR
- || token->type == CPP_WSTRING || token->type == CPP_STRING
+ || token->type == CPP_WSTRING || token->type == CPP_WCHAR
|| token->type == CPP_STRING32 || token->type == CPP_CHAR32
|| token->type == CPP_STRING16 || token->type == CPP_CHAR16);