aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2024-03-28 20:41:58 -0400
committerJacob Young <jacobly0@users.noreply.github.com>2024-03-30 20:50:48 -0400
commit5a41704f7ec2c472897f955ecfe1feafa697ff68 (patch)
tree62984e96e61c367ce7ad304fc532051c10e6921d /test
parent6f10b11658c002b26341bff10e1dd522f2465b5a (diff)
downloadzig-5a41704f7ec2c472897f955ecfe1feafa697ff68.tar.gz
zig-5a41704f7ec2c472897f955ecfe1feafa697ff68.zip
cbe: rewrite `CType`
Closes #14904
Diffstat (limited to 'test')
-rw-r--r--test/behavior/align.zig1
-rw-r--r--test/behavior/vector.zig4
-rw-r--r--test/tests.zig17
3 files changed, 16 insertions, 6 deletions
diff --git a/test/behavior/align.zig b/test/behavior/align.zig
index b19ab8ae0c..2714612682 100644
--- a/test/behavior/align.zig
+++ b/test/behavior/align.zig
@@ -624,7 +624,6 @@ test "sub-aligned pointer field access" {
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest;
- if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
// Originally reported at https://github.com/ziglang/zig/issues/14904
diff --git a/test/behavior/vector.zig b/test/behavior/vector.zig
index 4b2ab52c59..042ee5a986 100644
--- a/test/behavior/vector.zig
+++ b/test/behavior/vector.zig
@@ -1176,18 +1176,22 @@ test "@shlWithOverflow" {
test "alignment of vectors" {
try expect(@alignOf(@Vector(2, u8)) == switch (builtin.zig_backend) {
else => 2,
+ .stage2_c => @alignOf(u8),
.stage2_x86_64 => 16,
});
try expect(@alignOf(@Vector(2, u1)) == switch (builtin.zig_backend) {
else => 1,
+ .stage2_c => @alignOf(u1),
.stage2_x86_64 => 16,
});
try expect(@alignOf(@Vector(1, u1)) == switch (builtin.zig_backend) {
else => 1,
+ .stage2_c => @alignOf(u1),
.stage2_x86_64 => 16,
});
try expect(@alignOf(@Vector(2, u16)) == switch (builtin.zig_backend) {
else => 4,
+ .stage2_c => @alignOf(u16),
.stage2_x86_64 => 16,
});
}
diff --git a/test/tests.zig b/test/tests.zig
index 525c6792b5..0c847e6e7f 100644
--- a/test/tests.zig
+++ b/test/tests.zig
@@ -1164,19 +1164,26 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step {
compile_c.addCSourceFile(.{
.file = these_tests.getEmittedBin(),
.flags = &.{
- // TODO output -std=c89 compatible C code
+ // Tracking issue for making the C backend generate C89 compatible code:
+ // https://github.com/ziglang/zig/issues/19468
"-std=c99",
"-pedantic",
"-Werror",
- // TODO stop violating these pedantic errors. spotted everywhere
+
+ // Tracking issue for making the C backend generate code
+ // that does not trigger warnings:
+ // https://github.com/ziglang/zig/issues/19467
+
+ // spotted everywhere
"-Wno-builtin-requires-header",
- // TODO stop violating these pedantic errors. spotted on linux
- "-Wno-address-of-packed-member",
+
+ // spotted on linux
"-Wno-gnu-folding-constant",
"-Wno-incompatible-function-pointer-types",
"-Wno-incompatible-pointer-types",
"-Wno-overlength-strings",
- // TODO stop violating these pedantic errors. spotted on darwin
+
+ // spotted on darwin
"-Wno-dollar-in-identifier-extension",
"-Wno-absolute-value",
},