Support > Source

patch for build error with gcc-4.4.3 on linux

(1/1)

SpaceLifeForm:
If you try to build the ScriptBasic interpreter with a newer gcc such as gcc-4.4.3,
you will encounter the following errors when compiling commands/function.c

commands/function.c: In function ‘COMMAND_GOSUB’:
commands/function.c:307: error: lvalue required as left operand of assignment
commands/function.c: In function ‘COMMAND_RETURNC’:
commands/function.c:327: error: lvalue required as left operand of assignment
commands/function.c: In function ‘COMMAND_POP’:
commands/function.c:349: error: lvalue required as left operand of assignment
commands/function.c: In function ‘COMMAND_EXITFUNC’:
commands/function.c:376: error: lvalue required as left operand of assignment

The reason is due to the usage of a typedef and a structure combination.

The patch reworks the code to avoid the problem.  It should be portable,
but has only been tested under Linux.

You can download the patch at <http://www.net-root.org/scriptbasic-patch>

Support:
Thanks for the patch and welcome to the ScriptBasic project.

Navigation

[0] Message Index

Go to full version