Re: [PATCH v2 1/4] automatically ban strcpy()
- From
Jeff King <peff@peff.net>
- Date
- Jul 26, 2018, 06:58 UTC
- Message-ID
- <20180726065840.GA27349@sigill.intra.peff.net>
- In-Reply-To
- <CAPig+cRpcUOA5+k7v3Gy3WsLohedEb=j-a_fCGc3g0ktDfsDVA@mail.gmail.com>
On Tue, Jul 24, 2018 at 01:20:58PM -0400, Eric Sunshine wrote:
Show 18 quoted lines
> On Tue, Jul 24, 2018 at 5:26 AM Jeff King <peff@peff.net> 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.
OK. I was on the fence, but it should be pretty trivial to switch. Let me see if I can just make a replacement for patch 1, or if the whole thing needs to be rebased on top.
-Peff