core.attribute - Remove friction for compiler attributes

Trass3r un at known.com
Wed Aug 22 19:03:25 UTC 2018


On Tuesday, 20 October 2015 at 07:57:29 UTC, Marco Leise wrote:
> For a while now GDC and LDC have supported a variety of their 
> backend's attributes, like inlining or compiling a specific 
> function with SSE4 in an otherwise generic x64 build.
>
> I think we should unify those into a common core.attribute, 
> either aliasing or replacing the vendor specific symbols. They 
> don't need to be functional immediately. There are two things 
> that I see need to be discussed.

I couldn't agree more.
It's awkward having to write such boilerplate code just to get 
something as common as @inline to compile across compilers.
Another example: 
https://github.com/JinShil/stm32f42_discovery_demo/blob/d61819015/source/runtime/object.d#L16

And for embedded applications @used, @section(".xy") and @weak 
would also be useful.


More information about the Digitalmars-d mailing list