aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 7c46b21717..6e190adf6f 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -5057,6 +5057,11 @@ static IrInstruction *ir_gen_pointer_type(IrBuilder *irb, Scope *scope, AstNode
IrInstruction *align_value;
if (align_expr != nullptr) {
+ if (ptr_len == PtrLenC) {
+ exec_add_error_node(irb->codegen, irb->exec, node,
+ buf_sprintf("[*c] pointers may not have align attribute"));
+ return irb->codegen->invalid_instruction;
+ }
align_value = ir_gen_node(irb, align_expr, scope);
if (align_value == irb->codegen->invalid_instruction)
return align_value;