compile.exp generally does not work for me on Fedora 38. However, I
sent a GCC patch to fix the plugin crash. With that patch, I get this
error from one test in compile.exp:
gdb command line:1:22: warning: initialization of 'int (*)(int)' from incompatible pointer type 'int (*)()' [-Wincompatible-pointer-types]
This patch adds a cast to compile.exp. This makes the test pass.
Reviewed-by: Keith Seitz <keiths@redhat.com>
"call func_nodebug"
gdb_test "p globalvar" " = -75" "expect -75"
gdb_test \
- "compile code int (*funcp) (int) = func_nodebug; globalvar = funcp (76);" \
+ "compile code int (*funcp) (int) = (int (*) (int)) func_nodebug; globalvar = funcp (76);" \
"warning: function has unknown return type; assuming int" \
"call func_nodebug indirectly"
gdb_test "p globalvar" " = -76" "expect -76"