On 10/04/2011 01:54 PM, Christian Borntraeger wrote:
With todays qemu git I get the following error when compiling for s390:

In file included from /home/cborntra/REPOS/qemu/tcg/tcg.c:175:0:
/home/cborntra/REPOS/qemu/tcg/s390/tcg-target.c:677:13: error: conflicting 
types for ‘tcg_out_mov’
/home/cborntra/REPOS/qemu/tcg/tcg.c:76:13: note: previous declaration of 
‘tcg_out_mov’ was here
/home/cborntra/REPOS/qemu/tcg/s390/tcg-target.c:689:13: error: conflicting 
types for ‘tcg_out_movi’
/home/cborntra/REPOS/qemu/tcg/tcg.c:77:13: note: previous declaration of 
‘tcg_out_movi’ was here
/home/cborntra/REPOS/qemu/tcg/s390/tcg-target.c:829:20: error: conflicting 
types for ‘tcg_out_ld’
/home/cborntra/REPOS/qemu/tcg/tcg.c:74:13: note: previous declaration of 
‘tcg_out_ld’ was here
/home/cborntra/REPOS/qemu/tcg/s390/tcg-target.c:839:20: error: conflicting 
types for ‘tcg_out_st’
/home/cborntra/REPOS/qemu/tcg/tcg.c:81:13: note: previous declaration of 
‘tcg_out_st’ was here
make[1]: *** [tcg/tcg.o] Error 1

reverting c0ad3001bf12292b137b05e1c4643f31c6b0a727 ""tcg: Add forward declarations 
for local functions"
solves the problem, but it just hides the problem. Any ideas howto solve that 
properly?

The problem is that tcg.c defines the functions with int arguments for TCG register indexes, while s390/tcg-target.c takes TCGReg parameters. I'm not sure which way is better, but using TCGReg feels more type safe to me.


Alex


Reply via email to