aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2001-01-10 21:32:15 +0000
committerNeil Booth <neil@gcc.gnu.org>2001-01-10 21:32:15 +0000
commit5c5d1ea0c8c9faf670e045f24fbe53f5115d46da (patch)
tree9bc54295cab080e92961c0c2c633b0cf8d87d4a2
parentd9271ccca6f90fcdd7daed87f0bb2f6e94d2c698 (diff)
downloadgcc-5c5d1ea0c8c9faf670e045f24fbe53f5115d46da.zip
gcc-5c5d1ea0c8c9faf670e045f24fbe53f5115d46da.tar.gz
gcc-5c5d1ea0c8c9faf670e045f24fbe53f5115d46da.tar.bz2
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
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/cppinit.c10
-rw-r--r--gcc/cpplib.h8
-rw-r--r--gcc/cppmain.c8
-rw-r--r--gcc/gcc.c2
5 files changed, 15 insertions, 22 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7fadcb7..0baa2de 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/cppinit.c b/gcc/cppinit.c
index 0c43a23..fd6a408 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 <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\
diff --git a/gcc/cpplib.h b/gcc/cpplib.h
index d5063b9..bbfb48c 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 81fdac9..9e08bbe 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 d003e25..34a5cfe 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. */