Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit b2b7732

Browse files
WalterBrightGeod24
authored andcommitted
DIP1034 add noreturn to object, abort, exit, _Exit
1 parent b351bc3 commit b2b7732

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/core/stdc/stdlib.d

+3-3
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,13 @@ void* realloc(void* ptr, size_t size);
164164
void free(void* ptr);
165165

166166
///
167-
void abort() @safe;
167+
noreturn abort() @safe;
168168
///
169-
void exit(int status);
169+
noreturn exit(int status);
170170
///
171171
int atexit(void function() func);
172172
///
173-
void _Exit(int status);
173+
noreturn _Exit(int status);
174174

175175
///
176176
char* getenv(scope const char* name);

src/object.d

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ alias size_t = typeof(int.sizeof);
1515
alias ptrdiff_t = typeof(cast(void*)0 - cast(void*)0);
1616

1717
alias sizediff_t = ptrdiff_t; // For backwards compatibility only.
18+
alias noreturn = typeof(*null); /// bottom type
1819

1920
alias hash_t = size_t; // For backwards compatibility only.
2021
alias equals_t = bool; // For backwards compatibility only.

0 commit comments

Comments
 (0)