svn commit: r254626 - stable/9/usr.bin/yacc

David E. O'Brien obrien at FreeBSD.org
Wed Aug 21 22:57:30 UTC 2013


Author: obrien
Date: Wed Aug 21 22:57:29 2013
New Revision: 254626
URL: http://svnweb.freebsd.org/changeset/base/254626

Log:
  Provide a prototype for yyparse() so that "-Werror" along with stringent
  -W* warnings can be used on byacc's output.

Modified:
  stable/9/usr.bin/yacc/skeleton.c

Modified: stable/9/usr.bin/yacc/skeleton.c
==============================================================================
--- stable/9/usr.bin/yacc/skeleton.c	Wed Aug 21 22:55:10 2013	(r254625)
+++ stable/9/usr.bin/yacc/skeleton.c	Wed Aug 21 22:57:29 2013	(r254626)
@@ -196,6 +196,10 @@ const char *body[] =
     "#endif	/* ANSI-C/C++ */",
     "#endif	/* ! YYPARSE_PARAM */",
     "",
+    "#if defined(__cplusplus) || __STDC__",
+    "extern int yyparse (YYPARSE_PARAM_ARG);",
+    "#endif	/* ANSI-C/C++ */",
+    "",
     "int",
     "yyparse (YYPARSE_PARAM_ARG)",
     "    YYPARSE_PARAM_DECL",


More information about the svn-src-stable-9 mailing list