Re: [PATCH v2 1/4] automatically ban strcpy()
From: Eric Sunshine <hidden>
Date: 2018-07-24 17:21:11
On Tue, Jul 24, 2018 at 5:26 AM Jeff King [off-list ref] wrote:
1. We'll only trigger with -Wimplicit-function-declaration
(and only stop compilation with -Werror). These are
generally enabled by DEVELOPER=1. If you _don't_ have
that set, we'll still catch the problem, but only at
link-time, with a slightly less useful message:
If instead we convert this to a reference to an
undefined variable, that always dies immediately. But
gcc seems to print the set of errors twice, which
clutters things up.The above does a pretty good job of convincing me that this ought to be implemented via an undefined variable rather than undefined function, exactly because it is the newcomer or casual contributor who is most likely to trip over a banned function, and almost certainly won't have DEVELOPER=1 set. The gcc clutter seems a minor point against the benefit this provides to that audience.