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
This commit is contained in:
Neil Booth 2001-01-10 21:32:15 +00:00 committed by Neil Booth
parent d9271ccca6
commit 5c5d1ea0c8
5 changed files with 15 additions and 22 deletions

View File

@ -1,3 +1,12 @@
2001-01-10 Neil Booth <neil@daikokuya.demon.co.uk>
* 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 <aldyh@redhat.com>
* config/i960/i960.md: Change modifier to + on the zero_extract

View File

@ -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 <target> Add a MAKE-quoted target\n\
-MT <target> Add an unquoted target\n\
-g3 Include #define and #undef directives in the output\n\
"), stdout);
fputs (_("\
-D<macro> Define a <macro> with string '1' as its value\n\

View File

@ -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;

View File

@ -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);

View File

@ -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. */