samedi 4 avril 2020

g++ 4.7 code giving me an error: no matches converting function

I am trying to compile up some older code from a project that was developed and running around 2013. My build system is a Debian 10 (64-bit) system and the constructions is being handled via "scons"

Most of the bugs have been fixed, but I am running into something that I am not sure how to resolve as there are many errors similar to this coming up in the build:


executor/instructions.inc: In static member function
'static void :exec_0f80_jo_1(InstructionCache*, void*, void*)':
executor/instructions.inc:383:45: 
error: no matches converting function 'helper_JMP_static' to type 'int (*)(class InstructionCache*, void*)'

int (*foo) (InstructionCache *, void *) = helper_JMP_static < 1 >;
                                         ^~~~~~~~~~~~~~~~~~~~~~~ 
executor/insthelper.h:100:42: note: candidate is:
'template<unsigned int operand_size> static int InstructionCache::helper_JMP_static(InstructionCache*, void*)'
   static int __attribute__((regparm(3))) helper_JMP_static(InstructionCache *cache, void *tmp_src)

The "helper_JMP_static" is defined in another header file as:

template<unsigned operand_size>
static int __attribute__((regparm(3))) helper_JMP_static(InstructionCache *cache, void *tmp_src)
  { return cache->helper_JMP<operand_size>(tmp_src); }

Can anyone please help me to understand how to fix these? I am thinking that they are a casting problem but not sure.

I also presume that there was a change in gcc/g++ in the past and now makes these errors arise and not compile cleanly.

Any help would be greatly appreciated. Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire