diff options
author | Nathan Froyd <froydnj@codesourcery.com> | 2010-11-12 03:38:15 +0000 |
---|---|---|
committer | Nathan Froyd <froydnj@gcc.gnu.org> | 2010-11-12 03:38:15 +0000 |
commit | 3a789837f5cc67590765e2a2a7c4afed7730d405 (patch) | |
tree | c56e28b52155f9b2ee4a677a9f4053bfc8c50f83 /gcc/doc | |
parent | f03d897af30c62fe6e8e53c582cebefb1c35cd25 (diff) | |
download | gcc-3a789837f5cc67590765e2a2a7c4afed7730d405.zip gcc-3a789837f5cc67590765e2a2a7c4afed7730d405.tar.gz gcc-3a789837f5cc67590765e2a2a7c4afed7730d405.tar.bz2 |
re PR c/44782 (implement -ferror-limit=)
gcc/
PR c/44782
* common.opt (fmax-errors=): New option.
* opts.c (common_handle_option) [OPT_fmax_errors_]: Handle it.
* diagnostic.h (struct diagnostic_context): Add max_errors field.
* diagnostic.c (diagnostic_initialize): Initialize it.
(diagnostic_action_after_output): Exit if more than max_errors
have been output.
* doc/invoke.texi (Warning Options): Add -fmax-errors.
(-fmax-errors): Document.
gcc/fortran/
PR c/44782
* options.c (gfc_post_options): Initialize gfc_option.max_errors.
(gfc_handle_option) [OPT_fmax_errors_]: Remove.
* lang.opt (fmax-errors=): Remove.
gcc/testsuite/
PR c/44782
* c-c++-common/fmax-errors.c: New test.
From-SVN: r166644
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/invoke.texi | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index f2deda3..1a658ac 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -229,7 +229,8 @@ Objective-C and Objective-C++ Dialects}. @item Warning Options @xref{Warning Options,,Options to Request or Suppress Warnings}. -@gccoptlist{-fsyntax-only -pedantic -pedantic-errors @gol +@gccoptlist{-fsyntax-only fmax-errors=@var{n} -pedantic @gol +-pedantic-errors @gol -w -Wextra -Wall -Waddress -Waggregate-return -Warray-bounds @gol -Wno-attributes -Wno-builtin-macro-redefined @gol -Wc++-compat -Wc++0x-compat -Wcast-align -Wcast-qual @gol @@ -2775,6 +2776,15 @@ warnings but control the kinds of diagnostics produced by GCC. @opindex fsyntax-only Check the code for syntax errors, but don't do anything beyond that. +@item -fmax-errors=@var{n} +@opindex fmax-errors +Limits the maximum number of error messages to @var{n}, at which point +GCC bails out rather than attempting to continue processing the source +code. If @var{n} is 0 (the default), there is no limit on the number +of error messages produced. If @option{-Wfatal-errors} is also +specified, then @option{-Wfatal-errors} takes precedence over this +option. + @item -w @opindex w Inhibit all warning messages. |