Typical security issues in C++: why the GC isn't your enemy
areYouSureAboutThat
areYouSureAboutThat at gmail.com
Thu Dec 15 21:33:23 UTC 2022
On Thursday, 15 December 2022 at 18:48:56 UTC, Nick Treleaven
wrote:
>
> This is why `@safe module foo;` would be better than `@safe:` -
> it wouldn't override inference of @safe/@system. The only
> downside is then you have to have a module declaration even for
> simple D files.
One really should compile dmd from source, **after** altering the
dmd source in this way:
Required a module to always be annotated with @safe.
And if it is not annotated as such, the compiler provides a
warning, saying -> If you want to compile an unsafe module (i.e.
one not annotated as @safe), then you MUST pass -unsafe as a
parameter to the compiler.
I suspect D3 (in 2045) will be safe by default though.
But one does not need to wait that long just to make @safe
default .. its pretty easy to do it ;-)
More information about the Digitalmars-d
mailing list