[Issue 13165] Using -profile does extra control flow analysis, leading to spurious statement is not reachable warning
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jul 3 01:31:50 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=13165
--- Comment #3 from Mathias LANG <pro.mathias.lang at gmail.com> ---
Renamed the issue, as an extra case was reported here:
https://github.com/dlang/phobos/pull/6621#issuecomment-401980976
It seems the compiler is now able to propagate the fact that a function never
returns, e.g.:
```
struct S
{
@trusted void error(string msg)
{
throw new Exception("");
}
void fun2(){}
void fun1()
{
error("");
fun2;
}
}
```
Leads to a warning.
--
More information about the Digitalmars-d-bugs
mailing list