> From: "Todd C. Miller" <todd.mil...@courtesan.com> > Date: Thu, 31 Dec 2015 12:13:05 -0700 > > On Thu, 31 Dec 2015 11:02:01 -0800, Philip Guenther wrote: > > > Wouldn't it better to have yacc's skeleton.c provide a prototype so > > that it's fixed for all .y files? I see that bison's output includes > > an "int yyparse (void);" prototype, so I would expect minimal ports > > issues. > > That's probably the best approach of all.
Somewhat tricky though. It's standard practice to #define yyparse xxx_yyparse in order to prevent namespace problems. The prototype provided by yacc's skeleton.c should come after such a define. Perhaps adding it to the "header" bit will work. But I'm far from sure. It does seem standard practive to provide a yyparse() prototype. So I went ahead and committed that bit. No point in leaving the tree broken. Those who care can submit a diff to change yacc.