From owner-svn-src-all@freebsd.org Wed Aug 24 20:12:29 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4EDABBC5CB1; Wed, 24 Aug 2016 20:12:29 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [199.48.133.146]) by mx1.freebsd.org (Postfix) with ESMTP id 350551614; Wed, 24 Aug 2016 20:12:28 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from sweettea.beer.town (unknown [76.164.8.130]) by smtp.vangyzen.net (Postfix) with ESMTPSA id E3B9756488; Wed, 24 Aug 2016 15:12:21 -0500 (CDT) Subject: Re: svn commit: r303988 - head/lib/libc/gen To: Ed Schouten , Bryan Drewery References: <201608120703.u7C73whf007189@repo.freebsd.org> <9ae1c2eb-02ad-b8fe-6aff-7e17e955607a@FreeBSD.org> <2632f5f8-d765-3df7-74d7-da878eb4b7a8@FreeBSD.org> Cc: svn-src-head@freebsd.org, jilles@freebsd.org, svn-src-all@freebsd.org, src-committers , Ed Schouten From: Eric van Gyzen Message-ID: <62adcb77-490e-0691-0942-9218c1d55b68@FreeBSD.org> Date: Wed, 24 Aug 2016 15:12:18 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Aug 2016 20:12:29 -0000 On 08/24/2016 15:01, Ed Schouten wrote: > 2016-08-24 21:53 GMT+02:00 Bryan Drewery : >> Is it possible to cause the use of these old prototypes to print a >> warning and note that they are deprecated/unsafe? > > That's a good question. In theory, we could annotate these functions > with __attribute__((__deprecated__)): > > https://gcc.gnu.org/onlinedocs/gcc-3.3.4/gcc/Type-Attributes.html > > But I'm actually too afraid to use it. In the worst case it may cause > the compiler to generate a warning even when basename()/dirname() is > used correctly, as __old_* will still be part of the compiled > expression. Could __warn_references() be used, as libc currently does for gets() and others? Eric