ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


acc

This is an old revision of the document!


ACC

ACC is the official ACS compiler.

Alternative ACS compilers: BCC, GDCC.

Known bugs

Mixing strings and numbers in an array corrupts the numbers

int SomeArray[] = {
    1,
    3.14159,
    "string"
}

Can result in 1 and 3.14159 getting corrupted.

ACC incorrectly writes initial array values, resulting in some numbers getting interpreted as string indices and recalculated to avoid string index conflicts between libraries.

This bug only affects non-local arrays and happens randomly, usually only with large arrays.

To avoid this bug, do not use static initialization with non-local arrays, instead, declare an empty array and initialize it in a function:

int SomeArray[3];

function void InitArrays()
{
    SomeArray[0] = 1;
    SomeArray[1] = 3.14159;
    SomeArray[2] = "string";
}
acc.1499598142.txt.gz · Last modified: 2017/07/09 14:02 by korshun