[Bug c++/64524] gcc can't detect same expression in both parts of ternary operator

dcb314 at hotmail dot com gcc-bugzilla@gcc.gnu.org
Wed Jan 7 20:39:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64524

--- Comment #7 from David Binderman <dcb314 at hotmail dot com> ---
(In reply to David Binderman from comment #6)

Sorry, typo in my original code. Better code:

enum E { a, b, c, d };

void f(int val)
{
    int n = (val >= 10) ? a : (d - 3);
}



More information about the Gcc-bugs mailing list