ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


gdcc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
gdcc [2017/07/09 13:43] korshungdcc [2017/07/14 16:18] (current) korshun
Line 1: Line 1:
 +{{tag>acs_compilers}}
 ====== GDCC ====== ====== GDCC ======
 GDCC is an alternative ACS compiler, and also a standards-compliant compiler of the [[wp>C programming language]] to ACS VM bytecode. 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 is called **GDCC-ACC**.+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   * **ZDoom forums:** https://forum.zdoom.org/viewtopic.php?f=19&t=32078
Line 9: Line 10:
 ===== Known bugs ===== ===== Known bugs =====
  
-==== Missing "return" statement generates incorrect code ====+==== Missing "return" statement executes random other function'code ==== 
 + 
 +<note warning>This bug is extremely hard to detect.</note>
  
 <code> <code>
-function int f()+function int f(void)
 { {
     DoSomething();     DoSomething();
Line 25: Line 28:
  
 <code> <code>
-function void f()+function void f(void)
 { {
     int x = g(1, 2, 3);     int x = g(1, 2, 3);
Line 31: Line 34:
 } }
  
-function void g()+function void g(void)
 { {
     // This function does NOT return a value     // This function does NOT return a value
Line 39: Line 42:
  
 If a function is used before it's declared, GDCC allows ANY call to the function, unlike [[ACC]] and [[BCC]]. 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.
  
  
gdcc.1499597015.txt.gz · Last modified: 2017/07/09 13:43 by korshun