[Vm-dev] limiting compiler warnings...

David T. Lewis lewis at mail.msen.com
Wed Mar 21 16:46:06 UTC 2012

On Wed, Mar 21, 2012 at 09:45:04AM +0100, stephane ducasse wrote:
> >> I am quickly trying to limit the number of warnings we get when compiling cog.
> >> 
> >> The current output is amazingly verbose, and utterly useless when looking for possible bugs :/.
> >> Furthermore it seems that cared about the following warning:
> >> 
> >> /Users/cami-data/education/phd/project/cog/dh83s-blessed/src/vm/gcc3x-cointerp.c:2066: warning: passing argument 1 of ?longAt? makes integer from pointer without a cast
> >> 
> >> what would be the easiest way to introduce an auto-cast for longAt and family?
> >> I think the easiest solution would be to reintroduce the macros that are currently disabled, no?
> > 
> > That is a Really Bad Idea. If the warnings are bothering you, then just
> > relax and have a cup of tea. But they exist for a reason, and if you
> > ever want to get the type declarations right, you will want to pay
> > attention to the what the compiler is telling you. If you think there
> > are too many warnings, then put your energy into addressing the type
> > declaration issues that produce the warnings.
> Dave
> (non aggressive) Are vm maintainers interested in getting less warning?
> Because then it would be really a nice effort to push.

Yes, sure. Working through those compiler warnings have been a huge
part of the efforts to resolve 32/64 bit problems in the VM and in
plugins, and in making the VM capable of supporting larger object
memories. Not all of the warnings point to real problems in practice,
but in general it is good to look at each warning to understand
root cause, add type declarations where appropriate, and fix problems
when there is a real issue. There are still plenty of issues to be
fixed in plugins (for example, see Mantis for the SurfacePlugin issue,
that is a real challenging one). There is also an important FFI issue
on Mantis. The fixes probably have bit rot now, but I think the underlying
issues will certainly affect alien and the new FFI implementations on
64-bit platforms, so that is a good one to work on too.


More information about the Vm-dev mailing list