C++: Correctly Print EXACT_DIV_EXPR as '/'
GCC now prints EXACT_DIV_EXPR as `/` instead of `unknown operator`, aligning the output with FLOOR_DIV_EXPR.
GCC now prints EXACT_DIV_EXPR as / instead of unknown operator, which is consistent with how FLOOR_DIV_EXPR is printed. EXACT_DIV_EXPR represents exact integer division, and this change improves the readability of compiler diagnostics and error messages, especially when dealing with constant expressions. The fix addresses a regression introduced by a previous change.
In Details
The C++ frontend's dump_expr function now treats EXACT_DIV_EXPR the same as FLOOR_DIV_EXPR when printing expressions. This fixes a regression where EXACT_DIV_EXPR was printed as unknown operator instead of /. This ensures that the compiler output is consistent and understandable.
For Context
When the compiler encounters an expression it can't handle, or when printing out the reason why something isn't a constant expression, it needs to print out the expression in a human-readable way. This patch ensures that exact integer division expressions are represented with a / symbol, which matches what a programmer would expect.