Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Turn off useless diagnostic options, remove dead compiler options (st…

…ill handled in dmd-script).
  • Loading branch information...
commit 54b2524d9be1ffc23c2690931b34213ee97499db 1 parent 7720f6e
@ibuclaw ibuclaw authored
View
8 gcc/d/ChangeLog
@@ -1,3 +1,11 @@
+2012-09-18 Iain Buclaw <ibuclaw@ubuntu.com>
+
+ * d-lang.cc(d_initialize_diagnostics): New function, disable unneeded
+ diagnostic options.
+ (d_handle_option): Remove OPT_fdebug_c.
+ * d-spec.c(lang_specific_driver): Remove OPT_fod_, OPT_fop.
+ * lang.opt: Remove -fdebug-c, -fod, and -fop compiler options.
+
2012-09-17 Iain Buclaw <ibuclaw@ubuntu.com>
* d-codegen.h(CtorEltMaker::cons): Adjust call to VEC_safe_push.
View
15 gcc/d/d-lang.cc
@@ -47,6 +47,7 @@ static char lang_name[6] = "GNU D";
#undef LANG_HOOKS_INIT_TS
#undef LANG_HOOKS_INIT_OPTIONS
#undef LANG_HOOKS_INIT_OPTIONS_STRUCT
+#undef LANG_HOOKS_INITIALIZE_DIAGNOSTICS
#undef LANG_HOOKS_OPTION_LANG_MASK
#undef LANG_HOOKS_HANDLE_OPTION
#undef LANG_HOOKS_POST_OPTIONS
@@ -67,6 +68,7 @@ static char lang_name[6] = "GNU D";
#define LANG_HOOKS_INIT_TS d_common_init_ts
#define LANG_HOOKS_INIT_OPTIONS d_init_options
#define LANG_HOOKS_INIT_OPTIONS_STRUCT d_init_options_struct
+#define LANG_HOOKS_INITIALIZE_DIAGNOSTICS d_initialize_diagnostics
#define LANG_HOOKS_OPTION_LANG_MASK d_option_lang_mask
#define LANG_HOOKS_HANDLE_OPTION d_handle_option
#define LANG_HOOKS_POST_OPTIONS d_post_options
@@ -161,6 +163,15 @@ d_init_options_struct (struct gcc_options *opts)
opts->x_flag_strict_aliasing = 1;
}
+static void
+d_initialize_diagnostics (diagnostic_context *context)
+{
+ // We don't need any of these in error messages.
+ context->show_caret = false;
+ context->show_option_requested = false;
+ context->show_column = false;
+}
+
/* Return language mask for option parsing. */
static unsigned int
d_option_lang_mask (void)
@@ -389,10 +400,6 @@ d_handle_option (size_t scode, const char *arg, int value,
}
break;
- case OPT_fdebug_c:
- strcpy (lang_name, value ? "GNU C" : "GNU D");
- break;
-
case OPT_fdeprecated:
global.params.useDeprecated = value;
break;
View
9 gcc/d/d-objfile.cc
@@ -587,9 +587,9 @@ ObjectFile::stripVarDecl (tree value)
gcc_assert (d_type);
d_type = d_type->toBasetype();
- switch (d_type->ty)
+
+ if (d_type->ty == Tstruct)
{
- case Tstruct:
// %% maker sure this is doing the right thing...
// %% better do get rid of it..
dt_t *dt = NULL;
@@ -597,10 +597,9 @@ ObjectFile::stripVarDecl (tree value)
tree t = dt2tree (dt);
TREE_CONSTANT (t) = 1;
return t;
-
- default:
- gcc_unreachable();
}
+ else
+ gcc_unreachable();
}
}
View
21 gcc/d/d-spec.c
@@ -143,12 +143,6 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
/* The total number of arguments with the new stuff. */
int num_args = 1;
- /* Argument for -fod option. */
- char *output_directory_option = NULL;
-
- /* True if we saw -fop. */
- int output_parents_option = 0;
-
/* "-fonly" if it appears on the command line. */
const char *only_source_option = 0;
@@ -292,21 +286,6 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
}
break;
- case OPT_fod_:
- args[i] |= SKIPOPT;
- if (arg != NULL)
- {
- output_directory_option = xstrdup (arg);
- fprintf (stderr, "** outputdir = '%s'\n", output_directory_option);
- }
- break;
-
- case OPT_fop:
- args[i] |= SKIPOPT;
- output_parents_option = 1;
- fprintf (stderr, "** output parents\n");
- break;
-
case OPT_SPECIAL_input_file:
{
int len;
View
5 gcc/d/dmd-script
@@ -336,12 +336,9 @@ while ( $arg_i < scalar(@ARGV) ) {
push @link_out, '-defaultlib', $1;
} elsif ( $arg =~ m/^-deps=(.*)$/ ) {
push @out, (defined($1) ? "-fdeps=$1" : '-fdeps');
- } elsif ( $arg =~ m/^-g$/ ) {
+ } elsif ( $arg =~ m/^-g$|^-gc$/ ) {
$debug = 1;
push @out, '-g';
- } elsif ( $arg =~ m/^-gc$/ ) {
- $debug = 1;
- push @out, '-fdebug-c';
} elsif ( $arg =~ m/^-gs$/ ) {
push @out, '-fno-omit-frame-pointer';
} elsif ( $arg =~ m/^-gt$/ ) {
View
14 gcc/d/lang.opt
@@ -47,10 +47,6 @@ fdebug=
D Joined RejectNegative
-fdebug,-fdebug=<level>,-fdebug=<ident> Compile in debug code, code <= level, or code identified by ident
-fdebug-c
-D
-With -g, generate C debug information for debugger compatibility
-
fdeprecated
D
Allow use of deprecated features
@@ -124,20 +120,12 @@ D Joined RejectNegative
fmake-mdeps=
D Joined RejectNegative
-Like -fmake-deps=<file> but ignore system header files
-
-fod=
-Driver Joined
--fod=<directory> Specify the object output directory.
+Like -fmake-deps=<file> but ignore system modules
fonly=
D Joined RejectNegative
Process all modules specified on the command line, but only generate code for the module specified by the argument.
-fop
-Driver
-Specify that the source file's parent directories should be appended to the object output directory.
-
fout
D
Generate runtime code for out() contracts
Please sign in to comment.
Something went wrong with that request. Please try again.