No runtime attribute?
ketmar via Digitalmars-d
digitalmars-d at puremagic.com
Wed Dec 10 04:47:53 PST 2014
On Wed, 10 Dec 2014 10:46:56 +0000
bearophile via Digitalmars-d <digitalmars-d at puremagic.com> wrote:
> The #[no_std] attribute is used to avoid the runtime in Rust.
>
> Do we have any use for a @noruntime attribute in D?
>
> All @noruntime functions are also @nogc (so you don't need to put
> both attributes).
>
>
> This could give a compilation error:
>
> void foo(int[] a) @noruntime {
> int[5] b = a[];
> }
>
> Bye,
> bearophile
this can be useful if compiler will generate error message with exact
runtime function signatures. i.e. something like:
Error: foo() requires '_runtimeA(void*, size_t)'
or even better: add a command-line switch to generate such reports.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20141210/080926fe/attachment.sig>
More information about the Digitalmars-d
mailing list