Date: Thu, 22 Aug 2013 13:56:06 +0200 From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no> To: Bruce Evans <brde@optusnet.com.au> 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" <obrien@FreeBSD.org> Subject: Re: svn commit: r254626 - stable/9/usr.bin/yacc Message-ID: <864naios6h.fsf@nine.des.no> In-Reply-To: <20130822213005.H1824@besplex.bde.org> (Bruce Evans's message of "Thu, 22 Aug 2013 21:49:18 %2B1000 (EST)") References: <201308212257.r7LMvUmY053608@svn.freebsd.org> <8638q2i1oo.fsf@nine.des.no> <86y57ugn00.fsf@nine.des.no> <20130822213005.H1824@besplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans <brde@optusnet.com.au> writes: > Dag-Erling Sm=C3=B8rgrav <des@des.no> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?864naios6h.fsf>