diff options
author | Jakub Jelinek <jakub@redhat.com> | 2013-03-21 18:36:47 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2013-03-21 18:36:47 +0100 |
commit | 37e9911604ec069ee198879bb3a4af5d47b82a6b (patch) | |
tree | e5e6b0ddf9668c7b20ff0d85dbd749ba6244b7e9 /gcc/cp/call.c | |
parent | c845cfe1af6a72609e04a68b967f2b919599b32b (diff) | |
download | gcc-37e9911604ec069ee198879bb3a4af5d47b82a6b.zip gcc-37e9911604ec069ee198879bb3a4af5d47b82a6b.tar.gz gcc-37e9911604ec069ee198879bb3a4af5d47b82a6b.tar.bz2 |
re PR middle-end/48087 (-Wall -Werror adds warnings over and above those generated by -Wall)
PR middle-end/48087
* diagnostic.def (DK_WERROR): New kind.
* diagnostic.h (werrorcount): Define.
* diagnostic.c (diagnostic_report_diagnostic): For DK_WARNING
promoted to DK_ERROR, increment DK_WERROR counter instead of
DK_ERROR counter.
* toplev.c (toplev_main): Call print_ignored_options even if
just werrorcount is non-zero. Exit with FATAL_EXIT_CODE
even if just werrorcount is non-zero.
* pt.c (convert_nontype_argument): Count werrorcount as warnings.
* call.c (build_temp): Likewise.
* method.c (synthesize_method): Likewise.
* typeck.c (convert_for_initialization): Likewise.
From-SVN: r196887
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r-- | gcc/cp/call.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 5c9c286..87fbb2e 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -5709,12 +5709,12 @@ build_temp (tree expr, tree type, int flags, int savew, savee; vec<tree, va_gc> *args; - savew = warningcount, savee = errorcount; + savew = warningcount + werrorcount, savee = errorcount; args = make_tree_vector_single (expr); expr = build_special_member_call (NULL_TREE, complete_ctor_identifier, &args, type, flags, complain); release_tree_vector (args); - if (warningcount > savew) + if (warningcount + werrorcount > savew) *diagnostic_kind = DK_WARNING; else if (errorcount > savee) *diagnostic_kind = DK_ERROR; |