You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling printf("[...] %s", s) with some string literal s, an Assertion Error pops up:
example.c
#define FOO 10
#define str_expand(x) #x
#define str(x) str_expand(x)
struct In {
int in;
};
struct Out {
int out;
};
void compute(struct In *input, struct Out *output) {
/* Print constants */
printf("FOO: %s", str(FOO));
}
Error message during compilation
Exception in thread "main" java.lang.RuntimeException: Assertion error &604
at SFE.Compiler.PrintfStatement.toAssignmentStatements_NoChangeRef(PrintfStatement.java:93)
at SFE.Compiler.PrintfStatement.toAssignmentStatements(PrintfStatement.java:86)
at SFE.Compiler.BlockStatement.toAssignmentStatements(BlockStatement.java:111)
at ccomp.parser_hw.CCompiler.addStatement(CCompiler.java:521)
at ccomp.parser_hw.CCompiler.builtinFunctionCall(CCompiler.java:1651)
at ccomp.parser_hw.CCompiler.genericFunctionCall(CCompiler.java:1009)
at ccomp.parser_hw.CCompiler.getExpr(CCompiler.java:958)
at ccomp.parser_hw.CCompiler.getExpr(CCompiler.java:793)
at ccomp.parser_hw.CCompiler.expandStatement(CCompiler.java:660)
at ccomp.parser_hw.CCompiler.expandStatement(CCompiler.java:635)
at ccomp.parser_hw.CCompiler.access$1100(CCompiler.java:114)
at ccomp.parser_hw.CCompiler$CMainStatement.toAssignmentStatements(CCompiler.java:491)
at SFE.Compiler.BlockStatement.toAssignmentStatements(BlockStatement.java:111)
at SFE.Compiler.FunctionBody.toAssignmentStatements(FunctionBody.java:31)
at zcc.ZCC.compile(ZCC.java:260)
at zcc.ZCC.main(ZCC.java:127)
The text was updated successfully, but these errors were encountered:
When calling
printf("[...] %s", s)
with some string literals
, an Assertion Error pops up:example.c
Error message during compilation
The text was updated successfully, but these errors were encountered: