invalid C code generated (function + block + empty tuple) #4505

nigredo-tori opened this Issue Jul 21, 2016 · 0 comments


None yet

2 participants

nigredo-tori commented Jul 21, 2016 edited

Here's a shrunk example:

proc f(t: tuple[]) = discard
f((block: ()))

This results in following error message:

Error: execution of an external compiler program 'gcc -c  -w  -I/home/dmitry/work/nim/lib -o /home/dmitry/work/tmp/nimcache/dups_test_unit.o /home/dmitry/work/tmp/nimcache/dups_test_unit.c' failed with exit code: 256

/home/dmitry/work/tmp/nimcache/dups_test_unit.c: In function ‘test_unitInit000’:
/home/dmitry/work/tmp/nimcache/dups_test_unit.c:103:21: error: ‘LOC2’ undeclared (first use in this function)
/home/dmitry/work/tmp/nimcache/dups_test_unit.c:103:21: note: each undeclared identifier is reported only once for each function it appears in
@Araq Araq added a commit that closed this issue Aug 4, 2016
@Araq Araq fixes #4505, fixes #4230 7ea318a
@Araq Araq closed this in 7ea318a Aug 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment