On Sat, 3 Dec 2005, Paul Eggert wrote:
"Joel E. Denny" <[EMAIL PROTECTED]> writes:
What was wrong with the cast to void?
It caused lint warnings. Please see these threads:
http://lists.gnu.org/archive/html/bug-bison/2005-10/msg00000.html
http://lists.gnu.org/archive/html/bison-patches/2005-10/msg00022.html
Thanks for the references. Not sure why I didn't manage to locate those
earlier.
I don't get a `null effect' warning from lint on my system. However, for
the current YYUSE definition, I do see this warning:
warning: logical expression always false: op "&&"
So, I'm not sure it's really helping anyway.
How about this:
/* Suppress unused-variable warnings by "using" E. */
static int yyunused;
#define YYUSE(e) yyunused = (int*) &(e) && yyunused
No unused variables (as long as YYUSE is used somewhere), no always false
expressions, no constant conditionals, no null effect expressions, no
problems with structs.
Joel
_______________________________________________
Help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison