Should compilers take advantage (abuse) of the new UDA syntax that has been accepted?
Artur Skawina
art.08.09 at gmail.com
Tue Dec 18 13:36:11 PST 2012
On 12/18/12 21:33, Iain Buclaw wrote:
> b) No one infact uses GDC (go figure!).
> Similarly, no one has noticed that most of the pragma GDC supported have mysterious vanished either. The ones left at kept only for gcc.builtins support until a time I re-implement the attributes in a better way that I haven't decided on yet (hence why raising this thread).
See above - that's one thing that became completely clear after I first tried GDC and
filed the ~third gdc bugreport... Right now the situation is even worse, as dealing
with an experimental language is enough - having to also work with an unstable
compiler is not a practical option. If gdc is upstreamed hopefully some users will
return and new ones will come.
Pragmas weren't usable, for many obvious reasons, which i have mentioned here often enough.
Something like @gcc.noreturn will work, /after/ UDAs are properly handled by the frontend
(aliasing/tuples, attaching to locals (this may already work) and everything else etc).
The prefix isn't a problem because the typical usage will be
module config;
static if (this_is_gcc)
alias @noreturn = @gcc.noreturn;
else static if (this_is_whatever)
alias @noreturn = ID!(@whatever.no(return), @whatever.blah);
else
alias @noreturn = ID();
Ie no different than C/C++ attribute handling.
artur
More information about the Digitalmars-d
mailing list