[Issue 18534] Wrong code for ?: operator when compiling with -O

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Feb 27 20:38:07 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=18534

--- Comment #2 from hsteoh at quickfur.ath.cx ---
Reduced code without Phobos/template dependency:
-----
auto blah(char ch) { return ch; }
auto foo(int i)
{
    return blah(i ? 'A' : 'A');
}
void main()
{
    auto c = foo(0);
    assert(c == 'A');
}
-----

--


More information about the Digitalmars-d-bugs mailing list