From 611913766fa457bd9b0e3aa15bd5ef5ca244a5c1 Mon Sep 17 00:00:00 2001 From: neil Date: Mon, 12 Aug 2002 22:44:30 +0000 Subject: * c-opts.c (deps_seen, deps_file, deferred_count, deferred_size, handle_deferred_opts, sanitize_cpp_opts, defer_opt, struct deferred_opt): New. (COMMAND_LINE_OPTIONS): Add -M*. (missing_arg): Update. (c_common_decode_option): Handle -M*. (c_common_post_options): Handle -M*. Use sanitize_cpp_opts; don't call cpp_post_options. (c_common_finish, check_deps_environment_vars): Update. * cppfiles.c (stack_include_file, handle_missing_header): Update. * cpphash.h (CPP_PRINT_DEPS): Remove. * cppinit.c: Don't include version.h. (cpp_create_reader): Don't call deps_init. Initialize warn_long_long. (cpp_read_main_file): Init deps if necessary. (cpp_destroy): Conditionally free deps. (cpp_finish): Update. (no_tgt): Remove. (COMMAND_LINE_OPTIONS, cpp_handle_option): Remove -M*. (cpp_post_options): Rename post_options. * cpplib.h (struct cpp_options): Remove some dependency options; move others to a new structure. (cpp_post_options): Remove. (cpp_finish): Comment. * fix-header.c (read_scan_file): Don't call cpp_post_options. treelang: * treelang.c: Remove cpp_post_options. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56239 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cppfiles.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'gcc/cppfiles.c') diff --git a/gcc/cppfiles.c b/gcc/cppfiles.c index 653b33e283c..63e6f750ecb 100644 --- a/gcc/cppfiles.c +++ b/gcc/cppfiles.c @@ -319,7 +319,7 @@ stack_include_file (pfile, inc) (inc->foundhere ? inc->foundhere->sysp : 0)); /* For -M, add the file to the dependencies on its first inclusion. */ - if (CPP_OPTION (pfile, print_deps) > !!sysp && !inc->include_count) + if (CPP_OPTION (pfile, deps.style) > !!sysp && !inc->include_count) deps_add_dep (pfile->deps, inc->name); /* Not in cache? */ @@ -663,9 +663,10 @@ handle_missing_header (pfile, fname, angle_brackets) const char *fname; int angle_brackets; { - int print_dep = CPP_PRINT_DEPS(pfile) > (angle_brackets || pfile->map->sysp); - - if (CPP_OPTION (pfile, print_deps_missing_files) && print_dep) + bool print_dep + = CPP_OPTION (pfile, deps.style) > (angle_brackets || pfile->map->sysp); + + if (CPP_OPTION (pfile, deps.missing_files) && print_dep) deps_add_dep (pfile->deps, fname); /* If -M was specified, then don't count this as an error, because we can still produce correct output. Otherwise, we can't produce @@ -673,7 +674,7 @@ handle_missing_header (pfile, fname, angle_brackets) the missing file, and we don't know what directory this missing file exists in. */ else - cpp_errno (pfile, CPP_PRINT_DEPS (pfile) && ! print_dep + cpp_errno (pfile, CPP_OPTION (pfile, deps.style) && ! print_dep ? DL_WARNING: DL_ERROR, fname); } -- cgit v1.2.3