ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


acc

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
acc [2017/07/09 14:15] korshunacc [2017/07/14 22:23] (current) korshun
Line 1: Line 1:
 +{{tag>acs_compilers}}
 ====== ACC ====== ====== ACC ======
 ACC is the official ACS compiler. ACC is the official ACS compiler.
  
 Alternative ACS compilers: [[BCC]], [[GDCC]]. Alternative ACS compilers: [[BCC]], [[GDCC]].
 +
 +  * **GitHub**: https://github.com/rheit/acc/
  
 ===== Known bugs ===== ===== Known bugs =====
Line 60: Line 63:
 } }
 </code> </code>
 +
 +==== Strange compiler crash (ACC 1.56 beta Windows build only) ====
 +
 +<code>
 +#include "zcommon.acs"
 +
 +function int f(void)
 +{
 +    while (0)
 +        continue;
 +    return 0;
 +}
 +
 +function int g(void)
 +{
 +    while (0)
 +        continue;
 +    return 0;
 +}
 +</code>
 +
 +This code causes the compiler to enter an infinite loop. Any of the following fixes the issue:
 +
 +  * Removing one of the functions
 +  * Removing ''return 0;'' in one of the functions (causes compiler error, as expected)
 +  * Replacing ''continue;'' with ''break;'' in one of the functions
 +
 +But the following does not:
 +  * Changing the loop condition
 +  * Replacing ''int'' with ''void''
 +  * Adding more code before and after continue, both inside and outside the loop
 +  * Adding more functions anywhere else
 +  * Replacing "while" loop with "for"
 +
 +==== Local variable names can conflict with global names ====
 +
 +<code>
 +#define SOMENAME1 1
 +int somename2 = 2;
 +function void somename3(void) {}
 +
 +function f(int somename1) // ERROR
 +{
 +    int somename2; // ERROR
 +    int somename3; // ERROR
 +}
 +</code>
 +
 +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.
  
 ==== No "fixed" type ==== ==== No "fixed" type ====
acc.txt · Last modified: 2017/07/14 22:23 by korshun