aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-02-14 20:04:13 -0500
committerAndrew Kelley <andrew@ziglang.org>2019-02-14 20:04:13 -0500
commitd5bbd748711abc82272199869cf70faf1ea30f52 (patch)
treea3a15180a22228a4c38ccdcd79815349746aeaa4 /src
parentcc7060d0d934135d797bd2bc24288ecab095051a (diff)
downloadzig-d5bbd748711abc82272199869cf70faf1ea30f52.tar.gz
zig-d5bbd748711abc82272199869cf70faf1ea30f52.zip
allow C pointers to have alignment
clang/gcc support pointer alignment attribute: https://clang.llvm.org/docs/AttributeReference.html#align-value
Diffstat (limited to 'src')
-rw-r--r--src/ir.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 6e190adf6f..7c46b21717 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -5057,11 +5057,6 @@ 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;