forcing "@nogc" on class destructors

ketmar via Digitalmars-d digitalmars-d at puremagic.com
Tue Jan 20 13:49:38 PST 2015


On Tue, 20 Jan 2015 21:41:15 +0000
Vladimir Panteleev via Digitalmars-d <digitalmars-d at puremagic.com>
wrote:

> >> Not an error, Make it a warning.
> > alas, attribute violations are errors. turning that into 
> > warning means
> > that compiler needs new flags and new code to determine if that 
> > is
> > "hard restriction" or just "advise". the point of my proposal 
> > is that
> > it can be done painlessly with one or two very simple changes in
> > compiler code.
> 
> We already have warnings such as:
> 
> Warning: toHash() must be declared as extern (D) size_t toHash() 
> const nothrow @safe, not const uint()
> 
> It could issue a similar warning to destructors declared without 
> @nogc.
ah, i missed that, sorry. sure, if there is already mechanics for this,
warning will be ok. i just want the compiler to not remaining silent
about the possible issue, and making it error seemed the easiest way.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20150120/7277a133/attachment-0001.sig>


More information about the Digitalmars-d mailing list