digitalmars.D - extern safety
- Bruce Carneal (13/13) Apr 12 2020 This compiles to assembler with no @safe mangling.
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.
Apr 12 2020