[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
option to make yyparse declaration optional
From: |
Richard Prescott |
Subject: |
option to make yyparse declaration optional |
Date: |
31 Jul 2003 14:52:41 -0400 |
Hi
Because I do sometime thing like '#define yyparse classname::method'.
I got the compilation error:
/usr/share/bison/bison.simple:341: declaration of `int
classname::method()'
outside of class is not definition
So here a patch so we can '#define YY_NO_DECL_YYPARSE' to prevent that.
Thanks.
--- bison.simple 2003-07-31 14:42:47.000000000 -0400
+++ bison.simple.new 2003-07-31 14:43:24.000000000 -0400
@@ -332,12 +332,14 @@
# define YYPARSE_PARAM_DECL
#endif /* !YYPARSE_PARAM */
+#ifndef YY_NO_DECL_YYPARSE
/* Prevent warning if -Wstrict-prototypes. */
-#ifdef __GNUC__
-# ifdef YYPARSE_PARAM
+# ifdef __GNUC__
+# ifdef YYPARSE_PARAM
int yyparse (void *);
-# else
+# else
int yyparse (void);
+# endif
# endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- option to make yyparse declaration optional,
Richard Prescott <=