dynamic TYPE_ERROR code generation bug
The attached program TEbug.sac, when compiled with sac2c TEbug.sac
using sac2c 1.3.3-MijasCosta-1001-gb33d6
yields erroneous C code:
/Volumes/Users/sbs/Dropbox/BodoSac/escience/microHH/a.out.c:2986:22: warning: missing terminating '"' character [-Winvalid-pp-token]
SAC_TYPE_ERROR("./TYBUG.sac:10: error:
^
/Volumes/Users/sbs/Dropbox/BodoSac/escience/microHH/a.out.c:2988:1: warning: missing terminating '"' character [-Winvalid-pp-token]
")
^
/Volumes/Users/sbs/Dropbox/BodoSac/escience/microHH/a.out.c:2986:7: error: unterminated function-like macro invocation
SAC_TYPE_ERROR("./TYBUG.sac:10: error:
^
/Volumes/Users/sbs/sac2c/build_p/include/runtime/essentials_h/errors.h:23:9: note: macro 'SAC_TYPE_ERROR' defined here
#define SAC_TYPE_ERROR(message) SAC_RuntimeError (message);
^
2 warnings and 1 error generated.
Abort:
The offending code contains newlines instead of \n's:
SAC_TYPE_ERROR("./TYBUG.sac:10: error:
lower bound of with loop should be an integer vector; type found: int
")
I suspect that this broke during the error messaging revamp....