[Vm-dev] limiting compiler warnings...

John McIntosh johnmci at smalltalkconsulting.com
Wed Mar 21 02:20:31 UTC 2012

Ok, void is not int
10 years back (ok nov 29/30 2002 )
I was irritated about  int foo()  {  }  where foo says it returns int,
but never returns anything...
Attached is an ancient change set to fix that.

However what we found was that things like the all interface where you
would set the primitive failure code would "assume" setting the
primitive failure flag returned the failure flag.
Er it does not and the complier silently digests the stupidity...
Fixing issues like that higher up perhaps, ok if the api returns the
flag, return it? Or return nil or whatever the compiler helpfully
does scratching it's head about the confused messages...

Did once watch a "C" fellow pop a blood vessel when he saw the 1,200
warning msgs go by... Get over I said...

On Tue, Mar 20, 2012 at 9:50 PM, David T. Lewis <lewis at mail.msen.com> wrote:
> On Tue, Mar 20, 2012 at 04:35:15PM +0100, Camillo Bruni 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

John M. McIntosh <johnmci at smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: voidIsVoidNotInt.10.cs
Type: application/octet-stream
Size: 87787 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20120320/f907e824/voidIsVoidNotInt.10-0001.obj

More information about the Vm-dev mailing list