File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -3047,18 +3047,22 @@ $(H3 $(LNAME2 system-functions, System Functions))
3047
3047
and are not nested inside $(CODE @safe) functions.
3048
3048
System functions may be marked with the $(CODE @system) attribute.
3049
3049
A function being system does not mean it actually is unsafe, it just
3050
- means that the compiler is unable to verify that it cannot exhibit
3051
- undefined behavior.
3050
+ means that its safety must be manually verified.
3052
3051
)
3053
3052
3054
3053
$(P System functions are $(B not) covariant with trusted or safe functions.
3055
3054
)
3056
3055
3056
+ $(P System functions can call safe and trusted functions.)
3057
+
3057
3058
$(BEST_PRACTICE When in doubt, mark `extern (C)` and `extern (C++)` functions as
3058
3059
`@system` when their implementations are not in D, as the D compiler will be
3059
3060
unable to check them. Most of them are `@safe`, but will need to be manually
3060
3061
checked.)
3061
3062
3063
+ $(BEST_PRACTICE The number and size of system functions should be minimized.
3064
+ This minimizes the work necessary to manually check for safety.)
3065
+
3062
3066
$(H3 $(LNAME2 safe-interfaces, Safe Interfaces))
3063
3067
3064
3068
$(P Given that it is only called with $(RELATIVE_LINK2 safe-values, safe
You can’t perform that action at this time.
0 commit comments