@noreturn property

Leandro Lucarella luca at llucax.com.ar
Thu Oct 21 11:14:29 PDT 2010


Daniel Gibson, el 21 de octubre a las 17:15 me escribiste:
> >You want to include in the language what you can do (or at least could)
> >do in GDC using:
> >
> >pragma(GNU_attribute, noreturn)) void fatal()
> >{
> >     print("Error");
> >     exit(1);
> >}
> >
> >?
> >
> 
> Obviously he wants a portable way to do this that will work on any
> up-to-date D2 compiler.. doesn't make much sense to have a gdc-only
> solution that makes code incompatible with dmd (and possibly other
> compilers). Of course one may use version(GDC) or something like
> that to ensure compatibility, but that's just ugly.

Maybe it came out wrong, it wasn't my intention to make it sound like
a bad idea. On the contrary, I think is a good idea, and there are
plenty of other GCC attributes that worth having.

-- 
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
PIRATAS DEL ASFALTO ROBAN CAMION CON POLLOS CONGELADOS...
	-- Crónica TV


More information about the Digitalmars-d mailing list