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
require'io'localsts<nodecl,noinit>dolocalsts=1io.printf("inner local sts: %d\n", sts)
end--io.printf("outer local sts: %d\n", sts)
I get an error in C code:
/home/stefanos/.cache/nelua/tmp.c: In function ‘nelua_GC_registerroots’:
/home/stefanos/.cache/nelua/tmp.c:1288:43: error: ‘tmp_sts’ undeclared (first use in this function)
1288 | nelua_GC_register((&nelua_gc), (void*)(&tmp_sts), 16U, 2U, (function_BQVUyrpMeDmmPHpu)NULL, (void*)NULL);
| ^~~~~~~
/home/stefanos/.cache/nelua/tmp.c:1288:43: note: each undeclared identifier is reported only once for each function it appears in
error: C compilation for '/home/stefanos/.cache/nelua/tmp' failed
shell returned 1
Press ENTER or type command to continue
The text was updated successfully, but these errors were encountered:
This is not a bug, this is a misuse of nodecl annotation. When you use that annotation the compiler expects that the variable gets declared in the C file, but this was not the case, so you get a C compiler error. Usually you use nodecl with cimport and have the variable declared in some C header.
With the following code
I get an error in C code:
The text was updated successfully, but these errors were encountered: