GDCC icon indicating copy to clipboard operation
GDCC copied to clipboard

Disallow using latent functions in user-defined functions

Open PkmX opened this issue 8 years ago • 1 comments

Currently, gdcc-acc accepts calling latent functions (such as delay) in user-defined functions (which is disallowed in ZDoom's acc):

function void foo(void) {
    delay(1);
}

The compiled ACS code can make Zandronum 2.1.2 and 3.0-alpha to crash when run.

PkmX avatar Oct 23 '16 17:10 PkmX

This is allowed because some targets do allow delays in ordinary functions, so it cannot be turned into an error. I do want to add a warning for delays in non-void async script functions, though. Once I have that I can add an Eternity target and issue a warning for delays in ordinary functions for ZDoom and Zandronum targets.

DavidPH avatar Oct 25 '16 15:10 DavidPH