www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Target hook - compiler specific pragmas.

reply "Iain Buclaw" <ibuclaw ubuntu.com> writes:
As part of the front-end harmonising work I'm doing, will be 
adding in a Target hook to handle compiler-specific pragmas.  
This would abstract out code like this in LDC.

https://github.com/ldc-developers/ldc/blob/master/dmd2/attrib.c#L1113
https://github.com/ldc-developers/ldc/blob/master/dmd2/attrib.c#L1182

Which implements these pragmas.

http://wiki.dlang.org/LDC-specific_language_changes#Pragmas


I have plans for adding in pragmas into GDC at a later date too 
as I plan to make the magic modules of GDC re-locatable 
(core.stdc.stdarg, gcc.builtins, etc...)


David, you OK with this? :-)


Regards
Iain.
Oct 10 2013
parent "David Nadlinger" <code klickverbot.at> writes:
On Thursday, 10 October 2013 at 12:39:00 UTC, Iain Buclaw wrote:
 As part of the front-end harmonising work I'm doing, will be 
 adding in a Target hook to handle compiler-specific pragmas.  
 […]
 David, you OK with this? :-)
I can't speak for the other LDC devs, but I think this should be fine. ;) We still need some way to actually tag the marked up declarations as such internally. Currently, we have Dsymbol::llvmInternal for this – god, that name is awful –, but of course it would be nice if you could find a nicely generic solution for that as well. David
Oct 17 2013