* commom.opt (Wfatal-errors): Add it.
* diagnostic.c (flag_fatal_errors): Define it.
(diagnostic_action_after_output): Check for flag_fatal_errors.
* flags.h (flag_fatal_errors): Declare it.
* opts.c (common_handle_option): Add OPT_Wfatal_errors.
* doc/invoke.texi (Warning Options): Document -Wfatal-errors.
From-SVN: r81323
+2004-04-29 Richard Guenther <richard.guenther@uni-tuebingen.de>
+
+ * commom.opt (Wfatal-errors): Add it.
+ * diagnostic.c (flag_fatal_errors): Define it.
+ (diagnostic_action_after_output): Check for flag_fatal_errors.
+ * flags.h (flag_fatal_errors): Declare it.
+ * opts.c (common_handle_option): Add OPT_Wfatal_errors.
+ * doc/invoke.texi (Warning Options): Document -Wfatal-errors.
+
2004-04-30 Josef Zlomek <zlomekj@suse.cz>
* gcse.c (remove_reachable_equiv_notes): Delete notes also in
Common
Print extra (possibly unwanted) warnings
+Wfatal-errors
+Common
+Exit on the first error occurred
+
Winline
Common
Warn when an inlined function cannot be inlined
with preprocessed source if appropriate.\n\
See %s for instructions.\n"
+int flag_fatal_errors = 0;
\f
/* Return a malloc'd string containing MSG formatted a la printf. The
caller is responsible for freeing the memory. */
case DK_SORRY:
if (context->abort_on_error)
real_abort ();
+ if (flag_fatal_errors)
+ {
+ fnotice (stderr, "compilation terminated due to -Wfatal-errors.\n");
+ exit (FATAL_EXIT_CODE);
+ }
break;
case DK_ICE:
-Wconversion -Wno-deprecated-declarations @gol
-Wdisabled-optimization -Wno-div-by-zero -Wendif-labels @gol
-Werror -Werror-implicit-function-declaration @gol
--Wfloat-equal -Wformat -Wformat=2 @gol
+-Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol
-Wno-format-extra-args -Wformat-nonliteral @gol
-Wformat-security -Wformat-y2k @gol
-Wimplicit -Wimplicit-function-declaration -Wimplicit-int @gol
Warn whenever a comment-start sequence @samp{/*} appears in a @samp{/*}
comment, or whenever a Backslash-Newline appears in a @samp{//} comment.
+@item -Wfatal-errors
+@opindex Wfatal-errors
+This option causes the compiler to abort compilation on the first error
+occurred rather than trying to keep going and printing further error
+messages.
+
@item -Wformat
@opindex Wformat
Check calls to @code{printf} and @code{scanf}, etc., to make sure that
extern int flag_syntax_only;
extern int rtl_dump_and_exit;
+/* Nonzero if we are exiting on the first error occurred. */
+
+extern int flag_fatal_errors;
+
/* Nonzero means we should save auxiliary info into a .X file. */
extern int flag_gen_aux_info;
set_Wextra (value);
break;
+ case OPT_Wfatal_errors:
+ flag_fatal_errors = value;
+ break;
+
case OPT_Winline:
warn_inline = value;
break;