[Vm-dev] limiting compiler warnings...

Eliot Miranda eliot.miranda at gmail.com
Tue Mar 20 23:38:59 UTC 2012


On Tue, Mar 20, 2012 at 2:30 PM, Camillo Bruni <camillo.bruni at inria.fr>wrote:

>
>
> On 2012-03-20, at 20:11, Eliot Miranda wrote:
>
> > Hi Camillo,
> >
> > On Tue, Mar 20, 2012 at 8:35 AM, Camillo Bruni <camillo.bruni at inria.fr>
> 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?
> >
> > This doesn't seem right to me.  I've attached the warnings I get when I
> compile Cog with gcc 4.2.1 (on Mac OS X).  There are 39 lines for about 20
> warnings.  The unique warnings are
> >
> > "bytecodeSetSelector" redefined
> > assignment makes integer from pointer without a cast
> > format '%ld' expects type 'long int', but argument 2 has type 'sqInt'
> > ignoring asm-specifier for non-static local variable 'currentBytecode'
> > ignoring asm-specifier for non-static local variable 'localIP'
> > ignoring asm-specifier for non-static local variable 'localSP'
> > initialization from incompatible pointer type
> > left shift count >= width of type
> > passing argument 1 of 'printHex' makes integer from pointer without a
> cast
> > passing argument 2 of 'sqAllocateMemoryMac' makes pointer from integer
> without a cast
> > return makes integer from pointer without a cast
> >
> > So no warnings about longAt at all.  I wonder what is different between
> your compile environment and mine.  Are we both talking about Mac or are
> you on linux?
>
> I'm on mac using the standard setup we have on our jenkins server.
>
> gcc-4.2 --version
> i686-apple-darwin11-gcc-4.2.1
>
> I assume you disabled the following warnings?
> -Wno-pointer-to-int-cast
> -Wno-int-to-pointer-cast
>

Don't think so.  Here's my compile line as reported by xcodebuild:

    /Developer/usr/bin/gcc-4.2 -x c -arch i386 -fmessage-length=0 -pipe
-Wno-trigraphs -fpascal-strings -fasm-blocks -O3 -mdynamic-no-pic
-DNDEBUG=1 -DCOGMTVM=0 -DDEBUGVM=0 -DUSE_GLOBAL_STRUCT=0 -DNO_ISNAN
-DTARGET_API_MAC_CARBON -DSQUEAK_BUILTIN_PLUGIN -DHAVE_SYS_TIME_H -isysroot
/Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -gdwarf-2
-I/Users/eliot/Cog/oscogvm/macbuild/build/CoreVM.build/DeploymentSymbols/Croquet.build/Croquet.hmap
-F/Users/eliot/Cog/oscogvm/macbuild/build/DeploymentSymbols
-I/Users/eliot/Cog/oscogvm/macbuild/build/DeploymentSymbols/include
-I/Developer/SDKs/MacOSX10.5.sdk/Developer/Headers/FlatCarbon
-I/Users/eliot/Cog/oscogvm/macbuild
-I/Users/eliot/Cog/oscogvm/macbuild/build/CoreVM.build/DeploymentSymbols/Croquet.build/DerivedSources/i386
-I/Users/eliot/Cog/oscogvm/macbuild/build/CoreVM.build/DeploymentSymbols/Croquet.build/DerivedSources
-c /Users/eliot/Cog/oscogvm/macbuild/../src/vm/gcc3x-cointerp.c -o
/Users/eliot/Cog/oscogvm/macbuild/build/CoreVM.build/DeploymentSymbols/Croquet.build/Objects-normal/i386/gcc3x-cointerp.o


But note I'm *not* defining USE_INLINE_MEMORY_ACCESSORS.  Are you using the
same sqMemoryAccess.h as
http://www.squeakvm.org/svn/squeak/branches/Cog/platforms/Cross/vm/sqMemoryAccess.h?

>
> see https://ci.lille.inria.fr/pharo/job/Cog-Mac-Cocoa/28/consoleFull and
> grep for "[ 38%] Building C object" for the detailed view.
>
>
>
>


-- 
best,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20120320/6159e48f/attachment.htm


More information about the Vm-dev mailing list