bug-bison
[Top][All Lists]
Advanced

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

Re: %destructor feedback


From: Joel E. Denny
Subject: Re: %destructor feedback
Date: Sat, 3 Dec 2005 06:22:52 -0500 (EST)

On Sat, 3 Dec 2005, Paul Eggert wrote:

"Joel E. Denny" <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]