aboutsummaryrefslogtreecommitdiff
path: root/libcpp/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcpp/init.c')
-rw-r--r--libcpp/init.c29
1 files changed, 27 insertions, 2 deletions
diff --git a/libcpp/init.c b/libcpp/init.c
index 39e50f5a519..3bb61ae1223 100644
--- a/libcpp/init.c
+++ b/libcpp/init.c
@@ -140,6 +140,19 @@ cpp_create_reader (enum c_lang lang, hash_table *table,
pfile = xcalloc (1, sizeof (cpp_reader));
cpp_set_lang (pfile, lang);
+ /* APPLE LOCAL begin -Wextra-tokens 2001-08-01 --sts */
+ /* Suppress warnings about extra tokens after #endif etc. */
+ CPP_OPTION (pfile, warn_extra_tokens) = 0;
+ /* APPLE LOCAL end -Wextra-tokens 2001-08-01 --sts */
+ /* APPLE LOCAL begin -Wnewline-eof 2001-08-23 --sts */
+ /* Suppress warnings about missing newlines at ends of files. */
+ CPP_OPTION (pfile, warn_newline_at_eof) = 0;
+ /* APPLE LOCAL end -Wnewline-eof 2001-08-23 --sts */
+ /* APPLE LOCAL begin -Wfour-char-constants */
+ CPP_OPTION (pfile, warn_four_char_constants) = 1;
+ /* APPLE LOCAL end -Wfour-char-constants */
+ /* APPLE LOCAL pascal strings */
+ CPP_OPTION (pfile, pascal_strings) = 0;
CPP_OPTION (pfile, warn_multichar) = 1;
CPP_OPTION (pfile, discard_comments) = 1;
CPP_OPTION (pfile, discard_comments_in_macro_exp) = 1;
@@ -147,12 +160,18 @@ cpp_create_reader (enum c_lang lang, hash_table *table,
CPP_OPTION (pfile, tabstop) = 8;
CPP_OPTION (pfile, operator_names) = 1;
CPP_OPTION (pfile, warn_trigraphs) = 2;
- CPP_OPTION (pfile, warn_endif_labels) = 1;
- CPP_OPTION (pfile, warn_deprecated) = 1;
+ /* APPLE LOCAL begin -Wextra-tokens */
+ /* Suppress warnings about extra tokens after #endif etc. */
+ CPP_OPTION (pfile, warn_endif_labels) = 0;
+ /* APPLE LOCAL end -Wextra-tokens */
+ /* APPLE LOCAL suppress useful warnings */
+ CPP_OPTION (pfile, warn_deprecated) = 0;
CPP_OPTION (pfile, warn_long_long) = !CPP_OPTION (pfile, c99);
CPP_OPTION (pfile, dollars_in_ident) = 1;
CPP_OPTION (pfile, warn_dollars) = 1;
CPP_OPTION (pfile, warn_variadic_macros) = 1;
+ /* APPLE LOCAL mainline UCNs 2005-04-17 3892809 */
+ CPP_OPTION (pfile, warn_normalize) = normalized_C;
/* Default CPP arithmetic to something sensible for the host for the
benefit of dumb users like fix-header. */
@@ -459,8 +478,14 @@ cpp_read_main_file (cpp_reader *pfile, const char *fname)
deps_add_default_target (pfile->deps, fname);
}
+ /* APPLE LOCAL begin predictive compilation */
+ pfile->is_main_file = CPP_OPTION (pfile, predictive_compilation);
+ /* APPLE LOCAL end predictive compilation */
pfile->main_file
= _cpp_find_file (pfile, fname, &pfile->no_search_path, false);
+ /* APPLE LOCAL begin predictive compilation */
+ pfile->is_main_file = false;
+ /* APPLE LOCAL end predictive compilation */
if (_cpp_find_failed (pfile->main_file))
return NULL;