ACC is the official ACS compiler.
Alternative ACS compilers: BCC, GDCC.
ACSUtils has a lot more than 256 functions, but official releases of ACC can't compile programs with more than 256 functions.
To fix this, download the April 26, 2017 development version of ACC (unofficial build for Windows): http://acsutils.strangled.net/lib/exe/fetch.php?media=acc-1.56-beta-g3256a3e.zip
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, this includes multidimensional arrays, instead, declare an empty array and initialize it in a function:
int SomeArray[3]; function void InitArrays() { int i = 0; SomeArray[i++] = 1; SomeArray[i++] = 3.14159; SomeArray[i++] = "string"; }
Or, in a more beautiful way:
int SomeArray[3]; int SomeArrayCount = 0; function void AddEntry(int x) { SomeArray[SomeArrayCount++] = x; } function void InitArray(void) { AddEntry(1); AddEntry(3.14159); AddEntry("string"); }
#include "zcommon.acs" function int f(void) { while (0) continue; return 0; } function int g(void) { while (0) continue; return 0; }
This code causes the compiler to enter an infinite loop. Any of the following fixes the issue:
return 0;
in one of the functions (causes compiler error, as expected)continue;
with break;
in one of the functionsBut the following does not:
int
with void
#define SOMENAME1 1 int somename2 = 2; function void somename3(void) {} function f(int somename1) // ERROR { int somename2; // ERROR int somename3; // ERROR }
Local variables can't have the same names as any global names (function, constant, variable names). Unlike other compilers, local variable names don't shadow the global names, but trigger a compiler error.
There is no type called fixed
in ACC. Only int
, bool
and str
.