constexpr int BASE = 7; enum enum_test { A = BASE + 10, B }; int test() { return 100 / B; }
error report : test_5.cpp:10:16: error: Division by zero. [zerodiv] return 100 / B; ^
Incorrectly parse enum value B into 0 which is really 18.
This does not reproduce in 2.3.
Log in to post a comment.
error report :
test_5.cpp:10:16: error: Division by zero. [zerodiv]
return 100 / B;
^
Incorrectly parse enum value B into 0 which is really 18.
Last edit: houzhengtao 2020-06-22
This does not reproduce in 2.3.