Current GDC experience and questions

Iain Buclaw ibuclaw at ubuntu.com
Fri Mar 8 07:18:53 PST 2013


On 8 March 2013 14:36, Artur Skawina <art.08.09 at gmail.com> wrote:

> On 03/08/13 13:40, jerro wrote:
> >> I tried modifying some trivial sources, which were using only
> >> 'pragma(attribute, noinline)', but couldn't get them to work; the
> compiler keeps
> >> complaining, 'cc1d: error: unknown attribute noinline'.
> >> Is 'import gcc.attribute; @attribute("noinline") void f() {}' supposed
> to work?
> >
> > It isn't. When the syntax was changed to @attribute, all the gcc
> attributes were disabled. If I understood correctly, the reason was that
> those were only meant for internal GDC use. AFAIK, noinline was removed
> even before that.
> >
> > Iain did say something about adding supported attributes one by one as
> they are needed. So I guess you need to talk to him about adding noinline.
>
> I need them all. If D is to be an alternative to C/C++ it must support
> everything
> that's already available for those languages.
>

Yet not all attributes that GCC offers actually make sense to have in D.
We certainly need to have a review of each one and discuss what is most
important to have.  Also defining our own unique attributes along the way.
:o)



> In the specific case i tested with i need @flatten to get decent
> performance, and
> @noinline to have compile times measured in minutes and not hours
> (literally, as
> @flatten can otherwise result in practically infinite recursive inlining).
>
> artur
>


Raise a bug report to get those added so no one forgets.


-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/d.gnu/attachments/20130308/f624ba11/attachment.html>


More information about the D.gnu mailing list