compilers/imcc/pbc.c:182: warning

Joshua Hoblitt jhoblitt at ifa.hawaii.edu
Mon Apr 6 03:14:49 UTC 2009


On Sun, Apr 05, 2009 at 04:08:04PM -0700, Mark Glines wrote:
> Joshua Hoblitt wrote:
> > Building Parrot for the first time in _way to long_ today, I noticed this
> > compiler warning:
> > 
> >     compilers/imcc/pbc.c:182: warning: 'old_blocks' declared 'static' but never defined
> > 
> > Which bothered me.  It looks like in pbc.c there are prototypes for
> > old_blocks() declared twice.  One at line 182 and then again identically about
> > 100 lines lower inside a #ifdef HAS_JIT.  old_block() itself also lives inside
> > of another #ifdef HAS_JIT.  Is there any good reason not to remove the
> > prototype that sits outside the HAS_JIT ifdefs?
> 
> Yeah.  The stuff in the block delimited by "HEADERIZER BEGIN" and
> "HEADERIZER END" is autogenerated by "make headerizer", and headerizer
> isn't smart enough (yet) to understand #ifdefs.  So if you fix it, it
> will just come back the next time someone runs the headerizer.
> 
> I don't know if this has a ticket (yet), but I've mentioned it to Andy
> Lester (the author of headerizer) on at least one occasion.

Looking at headerizer.pl, this would take major work as no context
information is saved as to where the function declarations are stripped
from in the file.  Probably not worth the effort as long as no compiler
considers this a fatal error.

-J

--


More information about the parrot-dev mailing list