TT build fails on Windows due to cast warnings

Edwin Smith edwsmith at adobe.com
Tue Jun 24 08:54:28 PDT 2008


I think what might be happening is bitrot on the x-platform build for
windows.  I just looked in the VS2008 .vcproj settings for nanojit, and
one of the suppressed warnings is #4310.  Adding that to the manifest
and/or VS2005 project files, may just take care of it.

If we all agree (if not, i'll hear it soon!) that the One True Build
shall be the x-platform build, and that IDE project file maintenance is
strictly voluntary, then we need to collectivly whip the xp-build
settings for the microsoft compilers into shape.  I beleive we're using
the xp-build on all other platforms except windows, so this is the last
bastion.

Ed

> -----Original Message-----
> From: tamarin-devel-bounces at mozilla.org [mailto:tamarin-devel-
> bounces at mozilla.org] On Behalf Of Jim Blandy
> Sent: Tuesday, June 24, 2008 1:07 AM
> To: Tamarin Development
> Subject: TT build fails on Windows due to cast warnings
> 
> 
> In my first attempt to build TT on Windows, I'm getting errors like
the
> below, using VS2005.  This is in r7a7f1a6cdee6, and the warnings can
be
> placated with patches like this:
> 
> @@ -633,7 +633,7 @@
>  #define TEST_AX(i) do {
> \
>                 underrunProtect(5);
\
>                 *(--_nIns) = (0);               \
> -               *(--_nIns) = ((uint8_t)(i));                    \
> +               *(--_nIns) = ((uint8_t)((i)&0xff));     \
>                 *(--_nIns) = ((uint8_t)((i)>>8));               \
>                 *(--_nIns) = (0);               \
>                 *(--_nIns) = 0xa9;
\
> 
> But the code in question seems to date back much further that, so I
must
> be doing something wrong in the build; surely it hasn't been broken
for
> that long.  I've used the Mozilla tools package, and said:
> 
> $ python ../tamarin-tracing/configure.py --enable-shell --enable-debug
> $ make
> 
> ----
> 
> cl.exe -Fonanojit/Assembler.obj -MDd -DWIN32_LEAN_AND_MEAN -D_CONSOLE
-
> DAVMPLUS_IA32 -DWIN32 -DMMGC_INTERIOR_PTRS -DSOFT_ASSERTS -
> D_CRT_SECURE_NO_DEPRECATE  -DDEBUG -D_DEBUG   -TP -W4 -WX -wd4291
-EHsc  -Zi
> -I/c/m/tt/tamarin-tracing -I/c/m/tt/tamarin-tracing/core
-I/c/m/tt/tamarin-
> tracing/nanojit -I/c/m/tt/tamarin-tracing/pcre  -c
nanojit/Assembler.ii
> Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762
for
> 80x86
> Copyright (C) Microsoft Corporation.  All rights reserved.
> 
> Assembler.ii
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(615) : error C2220:
warning
> treated as error - no 'object' file generated
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(615) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(637) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(639) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(640) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(940) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(942) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(946) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(946) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(946) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(946) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(946) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(946) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(946) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(946) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1037) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1038) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1039) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1040) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1041) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1042) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1043) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1044) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1045) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1063) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1148) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1244) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1313) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1313) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1313) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1313) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1313) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1313) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1313) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1313) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1315) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1315) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1315) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1315) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1315) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1315) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1315) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1315) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1317) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1317) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1317) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1317) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1317) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1317) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1317) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1317) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1319) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1319) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1319) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1319) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1319) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1319) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1319) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1319) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1336) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1336) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1336) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1336) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1336) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1336) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1336) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1336) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1379) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1379) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1379) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1379) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1388) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1388) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1399) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1399) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1399) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1399) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1399) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1399) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1399) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1399) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1533) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1537) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1543) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1545) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1547) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1549) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1551) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1553) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1555) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1557) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1559) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1611) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1611) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1611) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1611) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1611) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1611) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1611) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1611) : warning C4310:
cast
> truncates constant value
> c:/m/tt/tamarin-tracing/nanojit/Assembler.cpp(1844) : warning C4310:
cast
> truncates constant value
> make: *** [nanojit/Assembler.obj] Error 2
> MOZMACMINI:tt-build$
> _______________________________________________
> Tamarin-devel mailing list
> Tamarin-devel at mozilla.org
> https://mail.mozilla.org/listinfo/tamarin-devel


More information about the Tamarin-devel mailing list