sac2c fails to compile empty while loop
|
|
Bugzilla Link |
919 |
Created on |
Feb 22, 2012 18:27 |
Resolution |
FIXED |
Resolved on |
Feb 27, 2012 11:56 |
Version |
1.00beta |
OS |
Linux |
Architecture |
PC |
Attachments |
919.sac |
Extended Description
sac2c fails to compile the following program with the empty while loop.
Compilation succeeds after adding a statement to the while loop.
The sac2c message is:
ERROR: line 10 file: t.sac
ERROR: Identifier 'stop` used without previous definition
import ScalarArith: all;
use StdIO : all;
int main()
{
if (argc() < 2) {
printf("Need at least one arg\n");
} else {
stop = false;
while (stop == false) {
}
}
return 0;
}