Skip to content

Commit

Permalink
BasicCABI.md: Add some explanation about enum size (WebAssembly#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
yamt authored Oct 4, 2022
1 parent 0b3e0a5 commit cb644a9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion BasicCABI.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ General type | C Type | `sizeof` | Alignment (bytes) | Wasm Value Type
compiler-rt library functions.
* A null pointer (for all types) has the value zero
* The `size_t` type is defined as `unsigned long`.

* An `enum` is `i32` if all the members of the `enum` can be represented
by an `int`.
An `enum` is `i32` if all the members of the `enum` can be represented
by an `unsigned int`.
Otherwise, if a compiler supports such an `enum`, it would use `i64`
for the `enum`.

**Aggregates and Unions**

Expand Down

0 comments on commit cb644a9

Please sign in to comment.