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 revision Previous revision
Next revision
Previous revision
acc [2017/07/09 18:45]
korshun
acc [2017/07/14 22:23] (current)
korshun
Line 63: 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 ==== ==== Local variable names can conflict with global names ====
acc.1499615157.txt.gz ยท Last modified: 2017/07/09 18:45 by korshun