Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
03146 Compiling Major Always May 7, 2009, 17:57 May 7, 2009, 22:04
Tester Roman View Status Public Platform MAME (Self-compiled)
Assigned To smf Resolution Fixed OS Windows XP/Vista 64-bit
Status [?] Resolved Driver
Version 0.131u1 Fixed in Version 0.131u2 Build 64-bit
Summary 03146: cpu\vtlb.c 64 bit warning: 64bit vs compile warnings
Description Compiling src/emu/cpu/vtlb.c...
vtlb.c
src\emu\cpu\vtlb.c(84) : error C2220: warning treated as error - no 'object' fil
e generated
src\emu\cpu\vtlb.c(84) : warning C4334: '<<' : result of 32-bit shift implicitly
 converted to 64 bits (was 64-bit shift intended?)
src\emu\cpu\vtlb.c(84) : warning C4334: '<<' : result of 32-bit shift implicitly
 converted to 64 bits (was 64-bit shift intended?)
mingw32-make: *** [obj/windows/vmame/emu/cpu/vtlb.o] Error 2
mingw32-make: *** Waiting for unfinished jobs....
Steps To Reproduce
Additional Information
Flags 64-bit specific
Regression Version
Affected Sets / Systems cpu\vtlb.c 64 bit warning
Attached Files
 
Relationships
There are no relationship linked to this issue.
Notes
3
User avatar
No.04337
Roman
Senior Tester
May 7, 2009, 18:11
VS = Visual Studio 2008 compile...
User avatar
No.04338
Tafoid
Administrator
May 7, 2009, 19:49
I'm told that removing "-Werror" flag allows successful compiling.
User avatar
No.04340
etabeta
Developer
May 7, 2009, 22:04
edited on: May 7, 2009, 22:11
yeah, but turning off warnings doesn't mean to fix the bug ;)

it's been fixed by smf

this is the fix (if you want to compile)

Modified: trunk/src/emu/cpu/vtlb.c
===================================================================
--- trunk/src/emu/cpu/vtlb.c    2009-05-07 19:39:37 UTC (rev 5443)
+++ trunk/src/emu/cpu/vtlb.c    2009-05-07 19:43:17 UTC (rev 5444)
@@ -81,7 +81,7 @@
       state_save_register_device_item_pointer(cpu, space, vtlb->live, fixed_entries + dynamic_entries);

       /* allocate the lookup table */
-       vtlb->table = alloc_array_clear_or_die(vtlb_entry, 1 << (vtlb->addrwidth - vtlb->pageshift));
+       vtlb->table = alloc_array_clear_or_die(vtlb_entry, (size_t) 1 << (vtlb->addrwidth - vtlb->pageshift));
       state_save_register_device_item_pointer(cpu, space, vtlb->table, 1 << (vtlb->addrwidth - vtlb->pageshift));

       /* allocate the fixed page count array */