aboutsummaryrefslogtreecommitdiff
path: root/src/parse.cff
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse.cff')
-rw-r--r--src/parse.cff6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/parse.cff b/src/parse.cff
index b42d45a..1449eab 100644
--- a/src/parse.cff
+++ b/src/parse.cff
@@ -858,7 +858,7 @@ fn typematchestarg(targ *const Type, ty *const Type) bool {
}
fn exprdup(alloc *Allocator, ex Expr) *Expr {
- return memcpy(alloc->alloc(sizeof(ex)), &ex, sizeof(ex));
+ return memcpy(alloc->alloc(sizeof(ex), alignof(ex)), &ex, sizeof(ex));
}
fn islvalue(ex Expr) bool {
@@ -955,7 +955,7 @@ fn mergetoktrees(alloc *Allocator, src *[#]Tok, n int) [#]Tok {
++total;
}
}
- let d *Tok = alloc->alloc(total * sizeof Tok);
+ let d *Tok = alloc->alloc(total * sizeof Tok, alignof Tok);
let len = 0;
for let i = 0; i < n; ++i {
if i > 0 {
@@ -1687,7 +1687,7 @@ fn parseexpr(P *Parser) Expr {
////////////////////////
fn stmtdup(alloc *Allocator, st Stmt) *Stmt {
- return memcpy(alloc->alloc(sizeof(st)), &st, sizeof(st));
+ return memcpy(alloc->alloc(sizeof(st), alignof(st)), &st, sizeof(st));
}
typedef StmtYielder *fn(Stmt, *void) void;