On Wednesday, 22 June 2022 at 21:20:33 UTC, Steven Schveighoffer wrote:
Full flow analysis will be defeatable by more complex situations:

```d
int *p = null;
if(alwaysEvaluateToFalse()) p = &arg;
else p = new int(5);
return p;
```

That would take a lot of effort just to prove it shouldn't be scope.

I guess this is the wrong forum, but two quick points.

Some C programmers reuse variables extensively, those programmers will be confused or annoyed.

The analysis can be done after an optimization pass, so at least the simple cases go through smoothly.


Reply via email to