diff options
| author | Noam Preil <pleasantatk@gmail.com> | 2020-07-07 17:51:59 -0400 |
|---|---|---|
| committer | Noam Preil <pleasantatk@gmail.com> | 2020-07-07 17:51:59 -0400 |
| commit | 6ece36a051f5cf2bd2329d3f6512a7e9d55486a3 (patch) | |
| tree | 89308f01b6a0ef341647175ecc761024d76e9477 /test | |
| parent | 2f28ecf946b566f40e648145af18d207d0c5770d (diff) | |
| download | zig-6ece36a051f5cf2bd2329d3f6512a7e9d55486a3.tar.gz zig-6ece36a051f5cf2bd2329d3f6512a7e9d55486a3.zip | |
Working translation of empty function
Diffstat (limited to 'test')
| -rw-r--r-- | test/stage2/cbe.zig | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/stage2/cbe.zig b/test/stage2/cbe.zig index a599367aec..86f966af82 100644 --- a/test/stage2/cbe.zig +++ b/test/stage2/cbe.zig @@ -11,8 +11,11 @@ const linux_x64 = std.zig.CrossTarget{ pub fn addCases(ctx: *TestContext) !void { // These tests should work on every platform ctx.c11("empty start function", linux_x64, - \\export fn start() void {} + \\export fn _start() noreturn {} , - \\void start(void) {} + // A newline is always generated after every function; this ensures, among + // other things, that there is always a newline at the end of the file + \\_Noreturn void _start(void) {} + \\ ); } |
