extern @safety
Bruce Carneal
bcarneal at gmail.com
Mon Apr 13 06:20:09 UTC 2020
This compiles to assembler with no @safe mangling.
extern(C) int maybeNotSafe() @safe;
with the compiler accepting it as safe when called like so:
int notCurrentlyMachineVerified() @safe { return maybeNotSafe(); }
Assuming we have this in another file:
extern(C) int maybeNotSafe() @safe { return 42; }
might the tool chain be modified to emit the unmangled name as
before, to serve C clients, and a dlang mangling + "ABI suffix"
alias to enable machine checkability for dlang clients?
The attribute permutations could get ugly unless the linkers have
some sort of set capability but probably better to have an exact
match requirement for the alias than to abandon machine
checkability.
More information about the Digitalmars-d
mailing list