{{tag>acs_compilers}} ====== GDCC ====== GDCC is an alternative ACS compiler, and also a standards-compliant compiler of the [[wp>C programming language]] to ACS VM bytecode. The ACS compiler part of GDCC is called **GDCC-ACC**. The rest is the C compiler. * **ZDoom forums:** https://forum.zdoom.org/viewtopic.php?f=19&t=32078 * **GitHub:** https://github.com/DavidPH/GDCC ===== Known bugs ===== ==== Missing "return" statement executes random other function's code ==== This bug is extremely hard to detect. function int f(void) { DoSomething(); // accidentally wrote "int" instead of "void" // This function will now proceed to some other random function's code } Functions that return a value but don't have "return" in the code **will execute some other random function's code** due to the compiler ignoring the missing return statement. ==== Functions without forward declarations can be called incorrectly ==== function void f(void) { int x = g(1, 2, 3); print(d:x); } function void g(void) { // This function does NOT return a value // and does NOT accept 3 arguments. } If a function is used before it's declared, GDCC allows ANY call to the function, unlike [[ACC]] and [[BCC]]. ==== Compiler errors result in 0 bytes compiled ACS ==== Some fatal compiler errors do not result in an error message, but in a compiled ACS file that is 0 bytes long. ==== Incomprehensible compiler errors ==== ''Bad gen Retn'' means that the name of the function is already used elsewhere.