fourspriter error with -O 2 option - Printable Version +- Forum (https://www.boriel.com/forum) +-- Forum: Compilers and Computer Languages (https://www.boriel.com/forum/forumdisplay.php?fid=12) +--- Forum: ZX Basic Compiler (https://www.boriel.com/forum/forumdisplay.php?fid=11) +---- Forum: Bug Reports (https://www.boriel.com/forum/forumdisplay.php?fid=15) +---- Thread: fourspriter error with -O 2 option (/showthread.php?tid=523) |
fourspriter error with -O 2 option - jevilon - 02-07-2013 When I try to build my game, using fourspriter 2.1, if you compile normal works, but if I put optimization level 2 or level 3 gives me the error: main.bas: 5526: error: Undefined label '__LABEL__fsp21DataPool' Na_th_an I asked and he said that you mentioned it to you. greetings Re: fourspriter error with -O 2 option - wilco2009 - 02-11-2013 It is logical. Fourspriter has some routines just to contain assembler code or data. These routines never have been called from basic but yes from assembler code. Compiler optimization process removes mentioned routines, but then them can't be called from assembler. Perhaps Boriel can detect these kind of situation in compiling time to solve it Re: fourspriter error with -O 2 option - boriel - 02-11-2013 wilco2009 Wrote:It is logical.These is very hard to fix (almost impossible). The 1st workaround is to place a dummy call somewhere. But the usual one is to use a #pragma directive to tell the compiler not to remove such code. Re: fourspriter error with -O 2 option - wilco2009 - 02-11-2013 boriel Wrote:Yes, it will be perfect!.wilco2009 Wrote:It is logical.These is very hard to fix (almost impossible). The 1st workaround is to place a dummy call somewhere. But the usual one is to use a #pragma directive to tell the compiler not to remove such code. It could be the best solution. Re: fourspriter error with -O 2 option - wilco2009 - 02-16-2013 boriel Wrote:I'm searching in the wiki the pagma directive to avoid remove a certain part of code, but I can't find the documentation for pragma directive.wilco2009 Wrote:It is logical.These is very hard to fix (almost impossible). The 1st workaround is to place a dummy call somewhere. But the usual one is to use a #pragma directive to tell the compiler not to remove such code. Could you help me on that?. Re: fourspriter error with -O 2 option - boriel - 02-16-2013 wilco2009 Wrote:It's not implemented yet! It was just an idea :oops:boriel Wrote:I'm searching in the wiki the pagma directive to avoid remove a certain part of code, but I can't find the documentation for pragma directive.wilco2009 Wrote:It is logical.These is very hard to fix (almost impossible). The 1st workaround is to place a dummy call somewhere. But the usual one is to use a #pragma directive to tell the compiler not to remove such code. :mrgreen: Re: fourspriter error with -O 2 option - wilco2009 - 02-16-2013 Oh sorry. I'll wait then. :lol: |