[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Enabling some -Werror=format* by default?



On Mon, 10 Jun 2024 at 16:24:54 +0200, Guillem Jover wrote:
> In general I think it's good (in principle) to enable -Werror flags
> that detect actual bugs in code, the problem is always going to be
> the amount of fallout and work that creates

Yes. The difficult thing here is balancing "detect actual (important)
bugs in code" against "detect non-bugs or unimportant bugs, and make
them be treated as if they were important".

Unfortunately, because compiler warnings are mostly heuristics involving
a reasonable guess about what the developer had intended to happen, most
compiler warnings do a mixture of both.

    smcv


Reply to: