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'.

Reply via email to