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

can't translate assert #173

Open
1000copy opened this issue Feb 5, 2024 · 0 comments
Open

can't translate assert #173

1000copy opened this issue Feb 5, 2024 · 0 comments

Comments

@1000copy
Copy link

1000copy commented Feb 5, 2024

when I tranlate this file by ·zig cc assert.c && ./a.out

//assert.c
#include <assert.h>
int main(){
    assert(0);
}

error happend :

assert.v:5:81: error: use `?` instead of `?void`
    3 | 
    4 | fn main()  {
    5 |     (if __builtin_expect(!(0), 0){ __assert_rtn(@FN, c'assert.c', 4, c'0') } else {void(0)})
      |                                                                                    ~~~~
    6 | }

What should I do to inplace fix assert.v to run it without error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant