From owner-svn-src-stable@FreeBSD.ORG Thu Aug 22 11:56:18 2013 Return-Path: Delivered-To: svn-src-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8C4A3A16; Thu, 22 Aug 2013 11:56:18 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 4CABD26A3; Thu, 22 Aug 2013 11:56:18 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id 9107841A9; Thu, 22 Aug 2013 11:56:17 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id 0A3BA2FBC3; Thu, 22 Aug 2013 13:56:09 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Bruce Evans Subject: Re: svn commit: r254626 - stable/9/usr.bin/yacc References: <201308212257.r7LMvUmY053608@svn.freebsd.org> <8638q2i1oo.fsf@nine.des.no> <86y57ugn00.fsf@nine.des.no> <20130822213005.H1824@besplex.bde.org> Date: Thu, 22 Aug 2013 13:56:06 +0200 In-Reply-To: <20130822213005.H1824@besplex.bde.org> (Bruce Evans's message of "Thu, 22 Aug 2013 21:49:18 +1000 (EST)") Message-ID: <864naios6h.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-9@FreeBSD.org, "David E. O'Brien" X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Aug 2013 11:56:18 -0000 Bruce Evans writes: > Dag-Erling Sm=C3=B8rgrav writes: > > Oh, it's actually our own fault for including -Wredundant-decls in > > CFLAGS. Is there a good reason to keep it? > How else would you detect bogus declarations of library functions? Almost > all -W flags are for detecting bugs that are mostly style bugs like this > one. This one only becomes more than a style bug if: > - the declaration becomes wrong > - the header with the correct declaration becomes not included. OK, point taken. > Another bug in the commit is that it auto-generates code with a style > bug (redundant extern). yacc in -current seems to auto-generate a > function prototype for just one function (the same one), and this has > the style bug too. This may be needed for K&R1 version compilers from > 1978, but not for the STDC case. I noticed that as well. So what do you suggest? Revert David's change, or keep it (minus extern) and remove the prototype from expr.y? I favor the latter option, since yyparse() is auto-generated and expr.y can therefore (strictly speaking) not know what the correct prototype looks like. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no