__attribute__((used)) and druntime

Jens Bauer via Digitalmars-d digitalmars-d at puremagic.com
Sat Apr 11 10:03:56 PDT 2015


On Saturday, 11 April 2015 at 15:35:47 UTC, w0rp wrote:
>
> From what I just read, __attribute__((used)) in GCC should do 
> the job, and I think it should be usable from GDC with its 
> attribute pragmas.

I wouldn't mind having this functionality.
For a long time, I've wanted it in C in those cases where I do 
not have a linker-script or do not have access to a linker-script.

In addition to the above, I think it would also be beneficial for 
those who write hardware/driver libraries for microcontrollers: 
Just drop in the files that you want to use, then they're linked 
when found. One could even just work with stand-alone object 
files marked 'used'.


More information about the Digitalmars-d mailing list