First post, by Dominus
- Rank
- DOSBox Moderator
Compiling (or trying) DOSBox with clang http://clang.llvm.org/ fails at first with compiling the dynrec core
In file included from core_dyn_x86.cpp:234:In file included from ./core_dyn_x86/decoder.h:1151:./core_dyn_x86/string.h:100:11: warning: 18 enumeration values not handled inswitch: 'STR_INSB', 'STR_INSW', 'STR_INSD'... [-Wswitch-enum]switch (op) {^In file included from core_dyn_x86.cpp:234:./core_dyn_x86/decoder.h:1837:10: warning: enumeration values 'LOOP_NONE' and'LOOP_JCXZ' not handled in switch [-Wswitch-enum]switch (type) {^In file included from core_dyn_x86.cpp:234:In file included from ./core_dyn_x86/decoder.h:1988:In file included from ./core_dyn_x86/dyn_fpu.h:49:./core_dyn_x86/../../fpu/fpu_instructions_x86.h:1164:2: error: ambiguousinstructions require an explicit suffix (could be 'filds', or 'fildl')FPUD_LOAD(fild,WORD,)^./core_dyn_x86/../../fpu/fpu_instructions_x86.h:560:4: note: instantiated from:#op #szA " (%2, %%eax) \n" \^<scratch space>:27:2: note: instantiated from:"fild"^<inline asm>:5:1: note: instantiated into assembly herefild (%edx, %eax)^In file included from core_dyn_x86.cpp:234:In file included from ./core_dyn_x86/decoder.h:1988:In file included from ./core_dyn_x86/dyn_fpu.h:49:./core_dyn_x86/../../fpu/fpu_instructions_x86.h:1214:2: error: ambiguousinstructions require an explicit suffix (could be 'fistps', or 'fistpl')FPUD_STORE(fistp,WORD,)^./core_dyn_x86/../../fpu/fpu_instructions_x86.h:621:4: note: instantiated from:#op #szA " (%3, %%eax) \n" \^<scratch space>:43:2: note: instantiated from:"fistp"^<inline asm>:8:1: note: instantiated into assembly herefistp (%esi, %eax)^In file included from core_dyn_x86.cpp:234:In file included from ./core_dyn_x86/decoder.h:1988:In file included from ./core_dyn_x86/dyn_fpu.h:49:./core_dyn_x86/../../fpu/fpu_instructions_x86.h:1224:2: error: invalidinstruction mnemonic 'fistpq'FPUD_STORE(fistp,QWORD,q)^./core_dyn_x86/../../fpu/fpu_instructions_x86.h:621:4: note: instantiated from:#op #szA " (%3, %%eax) \n" \^<scratch space>:47:2: note: instantiated from:"fistp"^<inline asm>:8:1: note: instantiated into assembly herefistpq (%edx, %eax)^In file included from core_dyn_x86.cpp:234:
In file included from ./core_dyn_x86/decoder.h:1988:In file included from ./core_dyn_x86/dyn_fpu.h:49:./core_dyn_x86/../../fpu/fpu_instructions_x86.h:1169:2: error: ambiguousinstructions require an explicit suffix (could be 'filds', or 'fildl')FPUD_LOAD_EA(fild,WORD,)^./core_dyn_x86/../../fpu/fpu_instructions_x86.h:586:4: note: instantiated from:#op #szA " (%1, %%eax) \n" \^<scratch space>:29:2: note: instantiated from:"fild"^<inline asm>:4:1: note: instantiated into assembly herefild (%edx, %eax)^2 warnings and 4 errors generated.make[4]: *** [core_dyn_x86.o] Error 1.
disabling dynamic lets it fail in compiling fpu
In file included from fpu.cpp:45:./fpu_instructions_x86.h:1169:2: error: ambiguous instructions require anexplicit suffix (could be 'filds', or 'fildl')FPUD_LOAD_EA(fild,WORD,)^./fpu_instructions_x86.h:586:4: note: instantiated from:#op #szA " (%1, %%eax) \n" \^<scratch space>:47:2: note: instantiated from:"fild"^<inline asm>:4:1: note: instantiated into assembly herefild (%ecx, %eax)^In file included from fpu.cpp:45:./fpu_instructions_x86.h:1164:2: error: ambiguous instructions require anexplicit suffix (could be 'filds', or 'fildl')FPUD_LOAD(fild,WORD,)^./fpu_instructions_x86.h:560:4: note: instantiated from:#op #szA " (%2, %%eax) \n" \^<scratch space>:45:2: note: instantiated from:"fild"^<inline asm>:5:1: note: instantiated into assembly herefild (%ecx, %eax)^In file included from fpu.cpp:45:./fpu_instructions_x86.h:1214:2: error: ambiguous instructions require anexplicit suffix (could be 'fistps', or 'fistpl')FPUD_STORE(fistp,WORD,)^./fpu_instructions_x86.h:621:4: note: instantiated from:#op #szA " (%3, %%eax) \n" \^<scratch space>:61:2: note: instantiated from:"fistp"^<inline asm>:8:1: note: instantiated into assembly herefistp (%edx, %eax)^In file included from fpu.cpp:45:./fpu_instructions_x86.h:1214:2: error: ambiguous instructions require anexplicit suffix (could be 'fistps', or 'fistpl')FPUD_STORE(fistp,WORD,)^./fpu_instructions_x86.h:621:4: note: instantiated from:#op #szA " (%3, %%eax) \n" \^<scratch space>:61:2: note: instantiated from:"fistp"^<inline asm>:8:1: note: instantiated into assembly herefistp (%edx, %eax)^In file included from fpu.cpp:45:./fpu_instructions_x86.h:1224:2: error: invalid instruction mnemonic 'fistpq'FPUD_STORE(fistp,QWORD,q)^
./fpu_instructions_x86.h:621:4: note: instantiated from:#op #szA " (%3, %%eax) \n" \^<scratch space>:65:2: note: instantiated from:"fistp"^<inline asm>:8:1: note: instantiated into assembly herefistpq (%edx, %eax)^5 errors generated.make[3]: *** [fpu.o] Error 1
disabling fpu will let it finish compiling with lots of warnings:
sdlmain.cpp:1627:9: warning: format string is not a string literal(potentially insecure) [-Wformat-security]printf(message);^~~~~~~1 warning generated.
softmodem.cpp:148:10: warning: enumeration value 'ResBUSY' not handled in switch[-Wswitch-enum]switch (response)^softmodem.cpp:273:28: warning: using the result of an assignment as a conditionwithout parentheses [-Wparentheses]while(waitingclientsocket=serversocket->Accept())~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~softmodem.cpp:273:28: note: place parentheses around the assignment to silencethis warningwhile(waitingclientsocket=serversocket->Accept())^( )softmodem.cpp:273:28: note: use '==' to turn this assignment into an equalitycomparisonwhile(waitingclientsocket=serversocket->Accept())^==2 warnings generated.
adlib.cpp:656:11: warning: enumeration values 'OPL_none' and 'OPL_cms' nothandled in switch [-Wswitch-enum]switch ( oplmode ) {^1 warning generated.
In file included from hardware.cpp:35:./../libs/zmbv/zmbv.cpp:342:11: warning: 5 enumeration values not handled inswitch: 'ZMBV_FORMAT_NONE', 'ZMBV_FORMAT_1BPP', 'ZMBV_FORMAT_2BPP'...[-Wswitch-enum]switch (format) {^./../libs/zmbv/zmbv.cpp:463:11: warning: 5 enumeration values not handled inswitch: 'ZMBV_FORMAT_NONE', 'ZMBV_FORMAT_1BPP', 'ZMBV_FORMAT_2BPP'...[-Wswitch-enum]switch (format) {^./../libs/zmbv/zmbv.cpp:487:11: warning: 5 enumeration values not handled inswitch: 'ZMBV_FORMAT_NONE', 'ZMBV_FORMAT_1BPP', 'ZMBV_FORMAT_2BPP'...[-Wswitch-enum]switch (format) {^3 warnings generated.
tandy_sound.cpp:408:45: warning: '&' within '|' [-Wbitwise-op-parentheses]tandy.dac.frequency = tandy.dac.frequency & 0xf00 | ...~~~~~~~~~~~~~~~~~~~~^~~~~~~ ~tandy_sound.cpp:408:45: note: place parentheses around the '&' expression tosilence this warningtandy.dac.frequency = tandy.dac.frequency & 0xf00 | ...^( )tandy_sound.cpp:421:45: warning: '&' within '|' [-Wbitwise-op-parentheses]tandy.dac.frequency = tandy.dac.frequency & 0x00ff | ...~~~~~~~~~~~~~~~~~~~~^~~~~~~~ ~tandy_sound.cpp:421:45: note: place parentheses around the '&' expression tosilence this warningtandy.dac.frequency = tandy.dac.frequency & 0x00ff | ...^( )2 warnings generated.
vga_other.cpp:262:9: warning: 14 enumeration values not handled in switch:'M_CGA2', 'M_CGA4', 'M_EGA'... [-Wswitch-enum]switch(vga.mode) {^1 warning generated.
vga_xga.cpp:975:9: warning: 14 enumeration values not handled in switch:'M_CGA2', 'M_CGA4', 'M_EGA'... [-Wswitch-enum]switch(XGA_COLOR_MODE) {^vga_xga.cpp:30:25: note: instantiated from:#define XGA_COLOR_MODE vga.s3.xga_color_mode^vga_xga.cpp:994:9: warning: 14 enumeration values not handled in switch:'M_CGA2', 'M_CGA4', 'M_EGA'... [-Wswitch-enum]switch(XGA_COLOR_MODE) {^vga_xga.cpp:30:25: note: instantiated from:#define XGA_COLOR_MODE vga.s3.xga_color_mode^2 warnings generated.
dbopl.cpp:847:10: warning: no case matching constant switch condition '11'switch( mode ) {^~~~dbopl.cpp:1034:28: note: in instantiation of function template specialization'DBOPL::Channel::BlockTemplate<11>' requested herechan[6].synthHandler = &...^dbopl.cpp:937:11: warning: no case matching constant switch condition '11'switch( mode ) {^~~~dbopl.cpp:847:10: warning: no case matching constant switch condition '10'switch( mode ) {^~~~dbopl.cpp:1036:28: note: in instantiation of function template specialization'DBOPL::Channel::BlockTemplate<10>' requested herechan[6].synthHandler = &...^dbopl.cpp:937:11: warning: no case matching constant switch condition '10'switch( mode ) {^~~~4 warnings generated.
int10_char.cpp:515:21: warning: equality comparison with extraneous parentheses[-Wparentheses]if ((CurMode->mode == 0x6)/* || (CurMode->mode==0x11)*/) attr = ...~~~~~~~~~~~~~~^~~~~~int10_char.cpp:515:21: note: remove extraneous parentheses around the comparisonto silence this warningif ((CurMode->mode == 0x6)/* || (CurMode->mode==0x11)*/) attr = ...~ ^ ~int10_char.cpp:515:21: note: use '=' to turn this equality comparison into anassignmentif ((CurMode->mode == 0x6)/* || (CurMode->mode==0x11)*/) attr = ...^~=int10_char.cpp:545:11: warning: enumeration values 'MCH_HERC' and 'MCH_TANDY'not handled in switch [-Wswitch-enum]switch (machine) {^2 warnings generated.
int10_modes.cpp:388:11: warning: 7 enumeration values not handled in switch:'M_HERC_GFX', 'M_HERC_TEXT', 'M_CGA16'... [-Wswitch-enum]switch (CurMode->type) {^int10_modes.cpp:447:10: warning: enumeration values 'MCH_EGA' and 'MCH_VGA' nothandled in switch [-Wswitch-enum]switch (machine) {^int10_modes.cpp:490:9: warning: 14 enumeration values not handled in switch:'M_EGA', 'M_VGA', 'M_LIN4'... [-Wswitch-enum]switch(CurMode->type) {^int10_modes.cpp:524:10: warning: enumeration values 'MCH_EGA' and 'MCH_VGA' nothandled in switch [-Wswitch-enum]switch (machine) {^int10_modes.cpp:737:10: warning: 8 enumeration values not handled in switch:'M_HERC_GFX', 'M_HERC_TEXT', 'M_CGA16'... [-Wswitch-enum]switch (CurMode->type) {^int10_modes.cpp:892:10: warning: 10 enumeration values not handled in switch:'M_EGA', 'M_LIN4', 'M_HERC_GFX'... [-Wswitch-enum]switch (CurMode->type) {^int10_modes.cpp:961:10: warning: 8 enumeration values not handled in switch:'M_HERC_GFX', 'M_HERC_TEXT', 'M_CGA16'... [-Wswitch-enum]switch (CurMode->type) {^int10_modes.cpp:1034:10: warning: 8 enumeration values not handled in switch:'M_HERC_GFX', 'M_HERC_TEXT', 'M_CGA16'... [-Wswitch-enum]switch (CurMode->type) {^int10_modes.cpp:1072:10: warning: 7 enumeration values not handled in switch:'M_HERC_GFX', 'M_HERC_TEXT', 'M_CGA16'... [-Wswitch-enum]switch (CurMode->type) {^int10_modes.cpp:1171:11: warning: 7 enumeration values not handled in switch:'M_HERC_GFX', 'M_HERC_TEXT', 'M_CGA16'... [-Wswitch-enum]switch (CurMode->type) {^int10_modes.cpp:1252:10: warning: 11 enumeration values not handled in switch:'M_LIN8', 'M_LIN15', 'M_LIN16'... [-Wswitch-enum]switch (CurMode->type) {^int10_modes.cpp:1415:9: warning: 12 enumeration values not handled in switch:'M_CGA2', 'M_CGA4', 'M_EGA'... [-Wswitch-enum]switch(vmodeBlock->type) {^12 warnings generated.
int10_vesa.cpp:568:10: warning: 4 enumeration values not handled in switch:'SVGA_None', 'SVGA_TsengET4K', 'SVGA_TsengET3K'... [-Wswitch-enum]switch (svgaCard) {^1 warning generated.
int10_pal.cpp:37:10: warning: enumeration values 'MCH_HERC' and 'MCH_CGA' nothandled in switch [-Wswitch-enum]switch (machine) {^int10_pal.cpp:91:10: warning: enumeration values 'MCH_HERC' and 'MCH_CGA' nothandled in switch [-Wswitch-enum]switch (machine) {^int10_pal.cpp:106:10: warning: enumeration values 'MCH_HERC' and 'MCH_CGA' nothandled in switch [-Wswitch-enum]switch (machine) {^3 warnings generated.
messages.cpp:92:4: warning: expression result unused [-Wunused-value]*parser++;^~~~~~~~~1 warning generated.
setup.cpp:654:31: warning: field width should have type 'int', but argument hastype 'size_t' (aka 'unsigned long') [-Wformat]snprintf(prefix,80, "\n# %*s ", maxwidth, "");~~^ ~~~~~~~~setup.cpp:662:27: warning: field width should have type 'int', but argument hastype 'size_t' (aka 'unsigned long') [-Wformat]fprintf(outfile, "# %*s: %s", maxwidth, ...~~^ ~~~~~~~~2 warnings generated.
Just reporting these since some of these could be actual problems (in Exult five out of a couple warnings were actual problems and not just style warnings).
I wonder what's up with dynamic and fpu. Maybe clang sucks at assembly?
There was another warning about coremidi deprecated stuff, but for that I can provide a patch.