Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/yacc Use __P((void)) for the function *definitions* ...



details:   https://anonhg.NetBSD.org/src/rev/df9b872e14c0
branches:  trunk
changeset: 521424:df9b872e14c0
user:      tv <tv%NetBSD.org@localhost>
date:      Wed Jan 30 20:37:59 2002 +0000

description:
Use __P((void)) for the function *definitions* of yygrowstack() and yyparse()
(not just their declarations) to make newer C++ compilers happy with the
output.  (Needed to make yacc produce less iffy code for src/tools/groff.)

diffstat:

 usr.bin/yacc/skeleton.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (50 lines):

diff -r cf023a3b0681 -r df9b872e14c0 usr.bin/yacc/skeleton.c
--- a/usr.bin/yacc/skeleton.c   Wed Jan 30 20:32:29 2002 +0000
+++ b/usr.bin/yacc/skeleton.c   Wed Jan 30 20:37:59 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: skeleton.c,v 1.21 2001/02/04 17:45:06 christos Exp $   */
+/*     $NetBSD: skeleton.c,v 1.22 2002/01/30 20:37:59 tv Exp $ */
 
 /*
  * Copyright (c) 1989 The Regents of the University of California.
@@ -37,11 +37,11 @@
  */
 
 #include <sys/cdefs.h>
-#ifndef lint
+#if defined(__RCSID) && !defined(lint)
 #if 0
 static char sccsid[] = "@(#)skeleton.c 5.8 (Berkeley) 4/29/95";
 #else
-__RCSID("$NetBSD: skeleton.c,v 1.21 2001/02/04 17:45:06 christos Exp $");
+__RCSID("$NetBSD: skeleton.c,v 1.22 2002/01/30 20:37:59 tv Exp $");
 #endif /* 0 */
 #endif /* not lint */
 
@@ -67,7 +67,7 @@
     "static char yysccsid[] = \"@(#)yaccpar    1.9 (Berkeley) 02/21/93\";",
     "#else",
     "#if defined(__NetBSD__) && defined(__IDSTRING)",
-    "__IDSTRING(yyrcsid, \"$NetBSD: skeleton.c,v 1.21 2001/02/04 17:45:06 christos Exp $\");",
+    "__IDSTRING(yyrcsid, \"$NetBSD: skeleton.c,v 1.22 2002/01/30 20:37:59 tv Exp $\");",
     "#endif /* __NetBSD__ && __IDSTRING */",
     "#endif /* 0 */",
     "#endif /* lint */",
@@ -138,7 +138,7 @@
 {
     "/* allocate initial stack or double stack size, up to YYMAXDEPTH */",
     "static int yygrowstack __P((void));",
-    "static int yygrowstack()",
+    "static int yygrowstack __P((void))",
     "{",
     "    int newsize, i;",
     "    short *newss;",
@@ -169,7 +169,7 @@
     "#define YYACCEPT goto yyaccept",
     "#define YYERROR goto yyerrlab",
     "int",
-    "yyparse()",
+    "yyparse __P((void))",
     "{",
     "    int yym, yyn, yystate;",
     "#if YYDEBUG",



Home | Main Index | Thread Index | Old Index