Schrodinger's CTFE

Ben Jones fake at fake.fake
Fri Jul 17 16:04:15 UTC 2020


On Thursday, 16 July 2020 at 22:15:05 UTC, Paul Backus wrote:
>
> Maybe if the unreachable code warning is causing us this much 
> trouble, we should just get rid of it. Personally, the number 
> of times it's done anything helpful for me are far outweighed 
> by the number of times it's gotten in my way.

I'm taking a look into trying to get rid of "false positive" 
warnings.  I think considering whether a return statement comes 
from a static if when doing stuff in blockexit.d.  Would love to 
hear suggestions for this/other approaches.

My test case is basically:

static foreach(whatever){
   static if(something){
      return false;
   }
}
return true;

which currently warns whenever one of the early returns is 
triggered.


More information about the Digitalmars-d mailing list