mir
mir copied to clipboard
[MIR] Undeclared name inff
MIR text generated by C2M doesn't compile when using INFINITY
macro
Test case:
#include <math.h>
#include <stdio.h>
int main() {
printf("%f\n", INFINITY);
return 0;
}
Output:
$ c2m -w t.c -eg
inf
$ c2m -w -S t.c
$ c2m t.mir -eg
ln 8: undeclared name inff
Thank you for reporting this. I'll need to think how to fix it. It is basically how to express infinity and nans in MIR, probably by using some reserved names.