svn commit: r254626 - stable/9/usr.bin/yacc
Bruce Evans
brde at optusnet.com.au
Thu Aug 22 12:47:40 UTC 2013
On Thu, 22 Aug 2013, [utf-8] Dag-Erling Smørgrav wrote:
> Bruce Evans <brde at optusnet.com.au> writes:
>> Dag-Erling Smørgrav <des at 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.
> ...
> 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.
Depends what the reason for merging the change is. Is it to cross-build
old sources with a current yacc? Then changing the old sources is not
so good. It makes them not-old, and missing the declaration going the
other way with an old yacc. I now remember not really liking the change
to expr.y in -current either for the same reason. It de-portabilizes the
sources a little.
Bruce
More information about the svn-src-stable-9
mailing list