https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94982
Martin Sebor 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 ---
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.c