TT build fails on Windows due to cast warnings

Jim Blandy jimb at mozilla.com
Mon Jun 23 22:06:54 PDT 2008


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$ 


More information about the Tamarin-devel mailing list