public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/94982] New: '-Wformat-diag' diagnostics building GCC
@ 2020-05-07 10:46 tschwinge at gcc dot gnu.org
2020-05-07 14:54 ` [Bug other/94982] " msebor at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2020-05-07 10:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94982
Bug ID: 94982
Summary: '-Wformat-diag' diagnostics building GCC
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: other
Assignee: unassigned at gcc dot gnu.org
Reporter: tschwinge at gcc dot gnu.org
CC: msebor at gcc dot gnu.org
Target Milestone: ---
In a x86_64-pc-linux-gnu GCC bootstrap build of commit
c416c52bcdb120db5e8c53a51bd78c4360daf79b (releases/gcc-10 branch point), I'm
counting 642 'warning: .* \[-Wformat-diag\]' diagnostics. For some files it's
hard to spot other diagnostics between all that "noise". I'm not saying that
'-Wformat-diag' diagnostics don't have any value (they do!), but there are
clearly bogus ones here -- we should do something about this, or disable if not
interested?
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug other/94982] '-Wformat-diag' diagnostics building GCC
2020-05-07 10:46 [Bug other/94982] New: '-Wformat-diag' diagnostics building GCC tschwinge at gcc dot gnu.org
@ 2020-05-07 14:54 ` msebor at gcc dot gnu.org
2020-11-25 1:10 ` msebor at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: msebor at gcc dot gnu.org @ 2020-05-07 14:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94982
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dmalcolm at gcc dot gnu.org
Last reconfirmed| |2020-05-07
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
The breakdown of the -Wformat-diag warnings from a recent x86_64-linux build of
mine is below. That's about 200. Where do all the others come from in your
build?
The largest subset of them are coming from the analyzer. Those I've looked at
are either for calls to logging functions, or to pp_xxx functions that don't
follow the expected format of GCC diagnostics. I'm not familiar enough with
the analyzer to say what the right way to deal with all those is. The messages
that are meant to be conform to the same formatting and spelling rules as
diagnostics should be cleaned up. Those that are more like the output of
-ftree-dump-xxx options should be suppressed (e.g., by a #pragma or by adding a
new attribute to exempt them from the warning).
The second largest subset is in gcc/cp/error.c. Those are caused by calls to
the pp_xxx functions that compose messages one piece at a time, with the
individual pieces not conforming to the expected format of complete diagnostic
messages. These should be suppressed (again, either by a #pragma or by adding
a new attribute).
I haven't looked craefully at the rest but I suspect they're in the pp_xxx
category.
My hope and expectation when I introduced the warnings (and kept them from
causing errors) was that they would get cleaned up over the course of GCC 10
development by contributors to and maintainers of the affected areas.
Unfortunately, not only has that not happened but the error suppression made it
possible for regressions to creep in.
Let me work on cleaning up those outside the analyzer and outside of back ends.
I'll leave the analyzer to David. I'm hoping back end maintainers will have
dealt with any warnings there by now however they feel is appropriate. Once
the remaining instances are all cleaned up I'd like to remove the -Werror
suppression for -Wformat-diag to keep any more regressions from sneaking in
(that's always been the goal).
-Wformat-diag Instances:
gcc/analyzer/analyzer-logging.cc:174
gcc/analyzer/analyzer-logging.cc:79
gcc/analyzer/call-string.cc:97
gcc/analyzer/checker-path.cc:112
gcc/analyzer/checker-path.cc:902
gcc/analyzer/checker-path.cc:916
gcc/analyzer/checker-path.cc:922
gcc/analyzer/constraint-manager.cc:574
gcc/analyzer/constraint-manager.cc:601
gcc/analyzer/diagnostic-manager.cc:381
gcc/analyzer/diagnostic-manager.cc:391
gcc/analyzer/diagnostic-manager.cc:402
gcc/analyzer/diagnostic-manager.cc:414
gcc/analyzer/diagnostic-manager.cc:432
gcc/analyzer/diagnostic-manager.cc:468
gcc/analyzer/diagnostic-manager.cc:806
gcc/analyzer/diagnostic-manager.cc:940
gcc/analyzer/diagnostic-manager.cc:942
gcc/analyzer/engine.cc:1496
gcc/analyzer/engine.cc:1508
gcc/analyzer/engine.cc:1532
gcc/analyzer/engine.cc:1535
gcc/analyzer/engine.cc:1536
gcc/analyzer/engine.cc:2229
gcc/analyzer/engine.cc:253
gcc/analyzer/engine.cc:2557
gcc/analyzer/engine.cc:2573
gcc/analyzer/engine.cc:2728
gcc/analyzer/engine.cc:2729
gcc/analyzer/engine.cc:2730
gcc/analyzer/engine.cc:2847
gcc/analyzer/engine.cc:2877
gcc/analyzer/engine.cc:2932
gcc/analyzer/engine.cc:2953
gcc/analyzer/engine.cc:3013
gcc/analyzer/engine.cc:3016
gcc/analyzer/engine.cc:3017
gcc/analyzer/engine.cc:3027
gcc/analyzer/engine.cc:3061
gcc/analyzer/engine.cc:3064
gcc/analyzer/engine.cc:3066
gcc/analyzer/engine.cc:3067
gcc/analyzer/engine.cc:3076
gcc/analyzer/engine.cc:3446
gcc/analyzer/engine.cc:3509
gcc/analyzer/engine.cc:3520
gcc/analyzer/engine.cc:3525
gcc/analyzer/engine.cc:3540
gcc/analyzer/engine.cc:3565
gcc/analyzer/engine.cc:3577
gcc/analyzer/engine.cc:3589
gcc/analyzer/engine.cc:3622
gcc/analyzer/engine.cc:3625
gcc/analyzer/engine.cc:3769
gcc/analyzer/engine.cc:389
gcc/analyzer/engine.cc:416
gcc/analyzer/engine.cc:572
gcc/analyzer/engine.cc:846
gcc/analyzer/engine.cc:871
gcc/analyzer/engine.cc:903
gcc/analyzer/program-point.cc:120
gcc/analyzer/program-state.cc:1072
gcc/analyzer/program-state.cc:173
gcc/analyzer/program-state.cc:688
gcc/analyzer/program-state.cc:69
gcc/analyzer/program-state.cc:698
gcc/analyzer/program-state.cc:717
gcc/analyzer/program-state.cc:726
gcc/analyzer/program-state.cc:74
gcc/analyzer/program-state.cc:806
gcc/analyzer/program-state.cc:928
gcc/analyzer/region-model.cc:1246
gcc/analyzer/region-model.cc:1300
gcc/analyzer/region-model.cc:1306
gcc/analyzer/region-model.cc:1488
gcc/analyzer/region-model.cc:1493
gcc/analyzer/region-model.cc:1598
gcc/analyzer/region-model.cc:1636
gcc/analyzer/region-model.cc:1643
gcc/analyzer/region-model.cc:1669
gcc/analyzer/region-model.cc:1671
gcc/analyzer/region-model.cc:193
gcc/analyzer/region-model.cc:2132
gcc/analyzer/region-model.cc:223
gcc/analyzer/region-model.cc:2282
gcc/analyzer/region-model.cc:2320
gcc/analyzer/region-model.cc:2327
gcc/analyzer/region-model.cc:2352
gcc/analyzer/region-model.cc:2576
gcc/analyzer/region-model.cc:2902
gcc/analyzer/region-model.cc:2904
gcc/analyzer/region-model.cc:2906
gcc/analyzer/region-model.cc:2908
gcc/analyzer/region-model.cc:3583
gcc/analyzer/region-model.cc:360
gcc/analyzer/region-model.cc:3651
gcc/analyzer/region-model.cc:3660
gcc/analyzer/region-model.cc:3741
gcc/analyzer/region-model.cc:6364
gcc/analyzer/sm.cc:103
gcc/analyzer/sm-file.cc:379
gcc/analyzer/sm-file.cc:385
gcc/analyzer/sm-malloc.cc:789
gcc/analyzer/sm-malloc.cc:795
gcc/analyzer/state-purge.cc:117
gcc/analyzer/state-purge.cc:135
gcc/analyzer/state-purge.cc:185
gcc/analyzer/state-purge.cc:193
gcc/analyzer/state-purge.cc:216
gcc/analyzer/state-purge.cc:258
gcc/analyzer/state-purge.cc:260
gcc/analyzer/state-purge.cc:295
gcc/analyzer/state-purge.cc:297
gcc/analyzer/state-purge.cc:323
gcc/analyzer/state-purge.cc:361
gcc/analyzer/state-purge.cc:431
gcc/analyzer/state-purge.cc:432
gcc/analyzer/state-purge.cc:473
gcc/analyzer/state-purge.cc:480
gcc/analyzer/supergraph.cc:154
gcc/analyzer/supergraph.cc:270
gcc/analyzer/supergraph.cc:271
gcc/analyzer/supergraph.cc:284
gcc/analyzer/supergraph.cc:288
gcc/analyzer/supergraph.cc:300
gcc/analyzer/supergraph.cc:304
gcc/analyzer/supergraph.cc:321
gcc/analyzer/supergraph.cc:335
gcc/analyzer/supergraph.cc:347
gcc/analyzer/supergraph.cc:449
gcc/analyzer/supergraph.cc:453
gcc/analyzer/supergraph.cc:454
gcc/analyzer/supergraph.cc:455
gcc/analyzer/supergraph.cc:456
gcc/analyzer/supergraph.cc:466
gcc/analyzer/supergraph.cc:552
gcc/analyzer/supergraph.cc:560
gcc/analyzer/supergraph.cc:632
gcc/analyzer/supergraph.cc:711
gcc/analyzer/supergraph.cc:719
gcc/analyzer/supergraph.cc:828
gcc/analyzer/supergraph.cc:832
gcc/analyzer/supergraph.cc:835
gcc/cgraphunit.c:763
gcc/cp/constraint.cc:535
gcc/cp/constraint.cc:537
gcc/cp/error.c:3496
gcc/cp/error.c:3497
gcc/cp/error.c:3522
gcc/cp/error.c:3525
gcc/cp/error.c:3533
gcc/cp/error.c:3534
gcc/cp/error.c:3539
gcc/cp/error.c:3540
gcc/cp/error.c:3547
gcc/cp/error.c:3548
gcc/cp/error.c:3600
gcc/cp/error.c:3606
gcc/cp/error.c:3660
gcc/cp/error.c:3664
gcc/cp/error.c:3676
gcc/cp/error.c:3679
gcc/cp/error.c:3708
gcc/cp/error.c:3725
gcc/cp/error.c:3738
gcc/cp/error.c:3765
gcc/cp/error.c:3769
gcc/cp/error.c:3786
gcc/cp/error.c:3946
gcc/cp/error.c:4004
gcc/cp/error.c:4108
gcc/cp/error.c:768
gcc/cp/logic.cc:321
gcc/cp/logic.cc:323
gcc/cp/parser.c:29138
gcc/cp/parser.c:9239
gcc/cp/typeck.c:2879
gcc/dbgcnt.c:129
gcc/digraph.cc:70
gcc/dumpfile.c:1120
gcc/dumpfile.c:496
gcc/dumpfile.c:499
gcc/dumpfile.c:503
gcc/edit-context.c:450
gcc/edit-context.c:451
gcc/edit-context.c:522
gcc/jit/jit-recording.c:3941
gcc/jit/jit-recording.c:3959
gcc/jit/jit-recording.c:4347
gcc/jit/jit-recording.c:4369
gcc/jit/jit-recording.c:4383
gcc/json.cc:73
gcc/lto-wrapper.c:504
gcc/lto-wrapper.c:505
gcc/lto-wrapper.c:512
gcc/lto-wrapper.c:513
gcc/lto-wrapper.c:521
gcc/pretty-print.c:2179
gcc/pretty-print.c:2182
gcc/tree-diagnostic-path.cc:419
gcc/tree-diagnostic-path.cc:627
gcc/ubsan.c:409
gcc/ubsan.c:428
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug other/94982] '-Wformat-diag' diagnostics building GCC
2020-05-07 10:46 [Bug other/94982] New: '-Wformat-diag' diagnostics building GCC tschwinge at gcc dot gnu.org
2020-05-07 14:54 ` [Bug other/94982] " msebor at gcc dot gnu.org
@ 2020-11-25 1:10 ` msebor at gcc dot gnu.org
2020-11-25 22:01 ` cvs-commit at gcc dot gnu.org
2020-11-25 22:07 ` msebor at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: msebor at gcc dot gnu.org @ 2020-11-25 1:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94982
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
Patch: https://gcc.gnu.org/pipermail/gcc-patches/2020-November/560129.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug other/94982] '-Wformat-diag' diagnostics building GCC
2020-05-07 10:46 [Bug other/94982] New: '-Wformat-diag' diagnostics building GCC tschwinge at gcc dot gnu.org
2020-05-07 14:54 ` [Bug other/94982] " msebor at gcc dot gnu.org
2020-11-25 1:10 ` msebor at gcc dot gnu.org
@ 2020-11-25 22:01 ` cvs-commit at gcc dot gnu.org
2020-11-25 22:07 ` msebor at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-11-25 22:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94982
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Sebor <msebor@gcc.gnu.org>:
https://gcc.gnu.org/g:ca23341b28cd3af7985b83a6479107d9ea145a90
commit r11-5393-gca23341b28cd3af7985b83a6479107d9ea145a90
Author: Martin Sebor <msebor@redhat.com>
Date: Wed Nov 25 14:05:01 2020 -0700
Clean up -Wformat-diag warnings (PR bootstrap/97622, PR bootstrap/94982)
gcc/c-family/ChangeLog:
PR bootstrap/94982
* c-attribs.c (handle_patchable_function_entry_attribute): Avoid
-Wformat-diag.
gcc/cp/ChangeLog:
PR bootstrap/94982
* constraint.cc (debug_argument_list): Avoid -Wformat-diag.
* error.c (function_category): Same.
(print_template_differences): Same.
* logic.cc (debug): Same.
* name-lookup.c (lookup_using_decl): Same.
* parser.c (maybe_add_cast_fixit): Same.
(cp_parser_template_introduction): Same.
* typeck.c (access_failure_info::add_fixit_hint): Same.
gcc/ChangeLog:
PR bootstrap/97622
PR bootstrap/94982
* config/i386/i386-options.c (ix86_valid_target_attribute_inner_p):
Avoid -Wformat-diag.
* digraph.cc (struct test_edge): Same.
* dumpfile.c (dump_loc): Same.
(dump_context::begin_scope): Same.
* edit-context.c (edited_file::print_diff): Same.
(edited_file::print_diff_hunk): Same.
* json.cc (object::print): Same.
* lto-wrapper.c (merge_and_complain): Same.
* reload.c (find_reloads): Same.
* tree-diagnostic-path.cc (print_path_summary_as_text): Same.
* ubsan.c (ubsan_type_descriptor): Same.
gcc/jit/ChangeLog:
PR bootstrap/94982
* jit-recording.c (recording::function::dump_to_dot): Avoid
-Wformat-diag.
(recording::block::dump_to_dot): Same.
gcc/testsuite/ChangeLog:
PR bootstrap/94982
* c-c++-common/patchable_function_entry-error-3.c: Adjust text
of expected warning.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug other/94982] '-Wformat-diag' diagnostics building GCC
2020-05-07 10:46 [Bug other/94982] New: '-Wformat-diag' diagnostics building GCC tschwinge at gcc dot gnu.org
` (2 preceding siblings ...)
2020-11-25 22:01 ` cvs-commit at gcc dot gnu.org
@ 2020-11-25 22:07 ` msebor at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: msebor at gcc dot gnu.org @ 2020-11-25 22:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94982
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> ---
With the patch committed in r11-5393 an x86_64-linux build should be free of
most if not all -Wformat-diag instances. I'm going to resolve this as fixed.
Let's track any outstanding instances or warnings on other targets as separate
bugs.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-11-25 22:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-07 10:46 [Bug other/94982] New: '-Wformat-diag' diagnostics building GCC tschwinge at gcc dot gnu.org
2020-05-07 14:54 ` [Bug other/94982] " msebor at gcc dot gnu.org
2020-11-25 1:10 ` msebor at gcc dot gnu.org
2020-11-25 22:01 ` cvs-commit at gcc dot gnu.org
2020-11-25 22:07 ` msebor at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).