From 5c5d1ea0c8c9faf670e045f24fbe53f5115d46da Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Wed, 10 Jan 2001 21:32:15 +0000 Subject: [PATCH] cppinit.c (OPT_g): Remove. * cppinit.c (OPT_g): Remove. (cpp_handle_option): Update for removed -g3. (print_help): Update. * cpplib.h (struct cpp_options): Remove debug_output. * cppmain.c (setup_callbacks, cb_define): Update. * gcc.c (cpp_options): Translate -g3 to -dD. From-SVN: r38881 --- gcc/ChangeLog | 9 +++++++++ gcc/cppinit.c | 10 ++-------- gcc/cpplib.h | 8 -------- gcc/cppmain.c | 8 +++----- gcc/gcc.c | 2 +- 5 files changed, 15 insertions(+), 22 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7fadcb7c51f..0baa2de5639 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2001-01-10 Neil Booth + + * cppinit.c (OPT_g): Remove. + (cpp_handle_option): Update for removed -g3. + (print_help): Update. + * cpplib.h (struct cpp_options): Remove debug_output. + * cppmain.c (setup_callbacks, cb_define): Update. + * gcc.c (cpp_options): Translate -g3 to -dD. + 2001-01-10 Aldy Hernandez * config/i960/i960.md: Change modifier to + on the zero_extract diff --git a/gcc/cppinit.c b/gcc/cppinit.c index 0c43a239e3f..fd6a4083c81 100644 --- a/gcc/cppinit.c +++ b/gcc/cppinit.c @@ -1062,7 +1062,6 @@ new_pending_directive (pend, text, handler) DEF_OPT("fpreprocessed", 0, OPT_fpreprocessed) \ DEF_OPT("fshow-column", 0, OPT_fshow_column) \ DEF_OPT("ftabstop=", no_num, OPT_ftabstop) \ - DEF_OPT("g", no_arg, OPT_g) /* arg optional */ \ DEF_OPT("h", 0, OPT_h) \ DEF_OPT("idirafter", no_dir, OPT_idirafter) \ DEF_OPT("imacros", no_fil, OPT_imacros) \ @@ -1230,10 +1229,10 @@ cpp_handle_option (pfile, argc, argv) { arg = &argv[i][cl_options[opt_index].opt_len + 1]; - /* Yuk. Special case for -g and -W as they must not swallow + /* Yuk. Special case for -W as it must not swallow up any following argument. If this becomes common, add another field to the cl_options table. */ - if (arg[0] == '\0' && !(opt_code == OPT_g || opt_code == OPT_W)) + if (arg[0] == '\0' && opt_code != OPT_W) { arg = argv[++i]; if (!arg) @@ -1282,10 +1281,6 @@ cpp_handle_option (pfile, argc, argv) case OPT_w: CPP_OPTION (pfile, inhibit_warnings) = 1; break; - case OPT_g: /* Silently ignore anything but -g3. */ - if (!strcmp(&argv[i][2], "3")) - CPP_OPTION (pfile, debug_output) = 1; - break; case OPT_h: case OPT__help: print_help (); @@ -1826,7 +1821,6 @@ Switches:\n\ -MP Generate phony targets for all headers\n\ -MQ Add a MAKE-quoted target\n\ -MT Add an unquoted target\n\ - -g3 Include #define and #undef directives in the output\n\ "), stdout); fputs (_("\ -D Define a with string '1' as its value\n\ diff --git a/gcc/cpplib.h b/gcc/cpplib.h index d5063b96c26..bbfb48c2790 100644 --- a/gcc/cpplib.h +++ b/gcc/cpplib.h @@ -411,14 +411,6 @@ struct cpp_options /* Nonzero means dump macros in some fashion - see above. */ unsigned char dump_macros; - /* Nonzero means pass all #define and #undef directives which we - actually process through to the output stream. This feature is - used primarily to allow cc1 to record the #defines and #undefs - for the sake of debuggers which understand about preprocessor - macros, but it may also be useful with -E to figure out how - symbols are defined, and where they are defined. */ - unsigned char debug_output; - /* Nonzero means pass #include lines through to the output. */ unsigned char dump_includes; diff --git a/gcc/cppmain.c b/gcc/cppmain.c index 81fdac9ada3..9e08bbe3807 100644 --- a/gcc/cppmain.c +++ b/gcc/cppmain.c @@ -168,8 +168,7 @@ setup_callbacks () if (CPP_OPTION (pfile, dump_includes)) pfile->cb.include = cb_include; - if (CPP_OPTION (pfile, debug_output) - || CPP_OPTION (pfile, dump_macros) == dump_names + if (CPP_OPTION (pfile, dump_macros) == dump_names || CPP_OPTION (pfile, dump_macros) == dump_definitions) { pfile->cb.define = cb_define; @@ -350,9 +349,8 @@ cb_define (pfile, node) maybe_print_line (cpp_get_line (pfile)->output_line); fprintf (print.outf, "#define %s", node->name); - /* -dD or -g3 command line options. */ - if (CPP_OPTION (pfile, debug_output) - || CPP_OPTION (pfile, dump_macros) == dump_definitions) + /* -dD command line option. */ + if (CPP_OPTION (pfile, dump_macros) == dump_definitions) fputs ((const char *) cpp_macro_definition (pfile, node), print.outf); putc ('\n', print.outf); diff --git a/gcc/gcc.c b/gcc/gcc.c index d003e25a498..34a5cfeeb9f 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -602,7 +602,7 @@ static const char *cpp_options = %{fshow-column} %{fno-show-column}\ %{fleading-underscore} %{fno-leading-underscore}\ %{fno-operator-names} %{ftabstop=*} %{remap}\ - %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*&U*&A*} %{i*} %Z %i\ + %{g3:-dD} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*&U*&A*} %{i*} %Z %i\ %{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}}"; /* NB: This is shared amongst all front-ends. */ -- 2.30.2