Am Mon, 12 Mar 2012 16:35:52 +0100 schrieb "Iain Buclaw" <ibuc...@ubuntu.com>:
> I'm picking up some old issues from bugzilla, this one is worth > having a community review. > > http://d.puremagic.com/issues/show_bug.cgi?id=1949 > > > Should hidden GCC features be imported from a magic module > provided by gcc.* packages - or should the implementation be > re-written using pragmas instead? I think I like the pragma approach more (as it allows auto-completion in IDEs and seems less 'magic'), but I don't have a strong opinion here. > > This is what LDC currently does (all of which would be possible > to do in GDC): > http://www.dsource.org/projects/ldc/wiki/Docs#Pragmas > > > Discuss. :) pragma(intrinsic) has the advantage that function declarations are available, so tools like visualD / mono-D can provide auto-completion for intrinsics. But maintaining all those pragma(intrinsics) is additional work, so I don't know if it's worth it. And what happens for intrinsics which are only supported on some architectures? version(ARM) + pragma(intrinsic)? I think that's too much work, especially as we already have working intrinsics. pragma(no_typeinfo/no_moduleinfo) sounds useful (Manu will probably like it ;-)) pragma(alloca): I don't know if this is needed? pragma(allow_inline): As we don't support dmd-compatible inline asm anymore and gcc inline asm doesn't prevent inlining AFAIR, this pragma isn't needed with gdc?