allow C pointers to have alignment

clang/gcc support pointer alignment attribute:
https://clang.llvm.org/docs/AttributeReference.html#align-value
This commit is contained in:
Andrew Kelley
2019-02-14 20:04:13 -05:00
parent cc7060d0d9
commit d5bbd74871
3 changed files with 2 additions and 11 deletions

View File

@@ -123,12 +123,8 @@ pub fn addCases(cases: *tests.CompileErrorContext) void {
\\export fn a() void {
\\ const T = [*c]Foo;
\\}
\\export fn b() void {
\\ const T = [*c]align(4) u8;
\\}
,
".tmp_source.zig:3:15: error: C pointers cannot point to non-C-ABI-compatible type 'Foo'",
".tmp_source.zig:6:15: error: [*c] pointers may not have align attribute",
);
cases.addTest(