Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CN-Exec] Spacing and for-loops cause source injection errors #655

Open
dc-mak opened this issue Oct 25, 2024 · 0 comments
Open

[CN-Exec] Spacing and for-loops cause source injection errors #655

dc-mak opened this issue Oct 25, 2024 · 0 comments
Assignees
Labels
bug Something isn't working CN spec testing cn

Comments

@dc-mak
Copy link
Contributor

dc-mak commented Oct 25, 2024

15:39VST git:(VST) ✗ cat tmp.c
int main()
{
    int sum = 0;
    for (int i=0; i<10; i++) {
        sum += i;
    }
    return (sum - sum + 2*sum - sum - sum);
}
15:39 ➜  VST git:(VST) ✗ /home/dhruv/.opam/4.14.1/lib/cn/runtime/libexec/cn-runtime-single-file.sh -o tmp.c
Generating C files from CN-annotated source.
./tmp-exec.c: In function ‘main’:
./tmp-exec.c:18:19: error: expected identifier or ‘(’ before ‘signed’
   18 | signed int i = 0, signed int a_687 = c_add_local_to_ghost_state((uintptr_t) &i, sizeof(signed int)), 0;
      |                   ^~~~~~
Failed to compile C files in /tmp/cn-exec.o6f3.
@dc-mak dc-mak added bug Something isn't working cn CN spec testing labels Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CN spec testing cn
Projects
None yet
Development

No branches or pull requests

2 participants