Skip to content

Commit

Permalink
add a few assertions on types
Browse files Browse the repository at this point in the history
  • Loading branch information
yamt committed Jun 5, 2023
1 parent 5d742a9 commit 331b8f0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/type.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ union v128 {
double f64[2];
};

_Static_assert(sizeof(float) == 4, "float");
_Static_assert(sizeof(double) == 8, "double");
_Static_assert(sizeof(union v128) == 16, "v128");

/*
* a value on operand stack, locals, etc.
*
Expand Down

0 comments on commit 331b8f0

Please sign in to comment.