Joel E. Denny wrote: > On Wed, 7 Dec 2005, Frank Heckenbach wrote: > > > And doesn't it also prevent the compiler from putting e in a > > register (when applied to a local variable), thus pessimizing the > > code generated? > > If the variable is unused except for the one reference within YYUSE(), how > much of an impact will it have if the compiler is unable to put it in a > register?
Maybe a small one, though it does have to allocate space ... > > And what about the yyunused variable? If it's declared locally, some > > version of a compiler or lint may find that it's assigned a value > > that's never used > > It is used at the next YYUSE() execution: And for the last (or only) one? > >, and if declared globally, a compiler cannot > > readily optimize away the spurious assignment. > > Unless YYUSE() appears in a short loop (not in bison, I believe), wouldn't > the performance penalty be trivial? Probably, though if the macro is made available to the user, they may use it in a short loop ... > I ask these questions out of ignorance, but if you wouldn't mind > entertaining them anyway, I'd appreciate it. I'm wondering if any kind of performance penalty is justified only to please lint ... Frank -- Frank Heckenbach, [EMAIL PROTECTED] http://fjf.gnu.de/ GnuPG and PGP keys: http://fjf.gnu.de/plan (7977168E)
