Skip to content

can't translate assert #173

@1000copy

Description

@1000copy

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions