Hi, Jürgen,
It may be just a weirdness in my compiler (g++ 10.2.1 20201125 (Red Hat
10.2.1-9)) but when I built your latest libapl it gave half a dozen
instances of things similar to:
libapl.cc: In function ‘Function* get_function_ucs(const unsigned int*,
Function**, Function**)’:
libapl.cc:459:55: error: invalid conversion from ‘Function_P’ {aka
‘const Function*’} to ‘APL_function’ {aka ‘Function*’} [-fpermissive]
459 | case TC_OPER2: return tos[0].get_function();
| ~~~~~~~~~~~~~~~~~~~^~
| |
| Function_P {aka const Function*}
I patched around it by casting tos[0].get_function() to
(APL_function)tos[1].get_function() but I expect there's a more elegant fix.
Anyway, I attached a diff file if you want to use it.
Chris
On 1/1/21 7:24 AM, Dr. Jürgen Sauermann wrote:
Hi Chris,
fixed in *SVN 1400*.
Index: src/libapl.cc
===================================================================
--- src/libapl.cc (revision 1400)
+++ src/libapl.cc (working copy)
@@ -456,7 +456,7 @@
case TC_FUN0:
case TC_FUN2:
case TC_OPER1:
- case TC_OPER2: return tos[0].get_function();
+ case TC_OPER2: return (APL_function)tos[0].get_function();
default: return 0; // error
}
}
@@ -467,7 +467,7 @@
switch(tos[1].get_Class())
{
- case TC_OPER1: *L = tos[0].get_function(); break;
+ case TC_OPER1: *L = (APL_function)tos[0].get_function(); break;
default: return 0; // error
}
@@ -474,7 +474,7 @@
switch(tos[0].get_Class())
{
case TC_FUN12:
- case TC_OPER1: return tos[1].get_function();
+ case TC_OPER1: return (APL_function)tos[1].get_function();
default: return 0;
}
}
@@ -486,7 +486,7 @@
switch(tos[0].get_Class())
{
case TC_FUN12:
- case TC_OPER1: *R = tos[0].get_function(); break;
+ case TC_OPER1: *R = (APL_function)tos[0].get_function(); break;
default: return 0; // error
}
@@ -493,13 +493,13 @@
switch(tos[2].get_Class())
{
case TC_FUN12:
- case TC_OPER1: *L = tos[0].get_function(); break;
+ case TC_OPER1: *L = (APL_function)tos[0].get_function(); break;
default: return 0; // error
}
switch(tos[1].get_Class())
{
- case TC_OPER2: return tos[1].get_function();
+ case TC_OPER2: return (APL_function)tos[1].get_function();
default: return 0;
}
}