xref: /aosp_15_r20/external/mesa3d/src/compiler/glsl/glcpp/tests/094-divide-by-zero-short-circuit.c (revision 6104692788411f58d303aa86923a9ff6ecaded22)
1 /* glcpp is generating a division-by-zero error for this case.  It's
2  * easy to argue that it should be short-circuiting the evaluation and
3  * not generating the diagnostic (which happens to be what gcc does).
4  * But it doesn't seem like we should force this behavior on our
5  * pre-processor, (and, as always, the GLSL specification of the
6  * pre-processor is too vague on this point).
7  *
8  * If a short-circuit evaluation optimization does get added to the
9  * pre-processor then it would legitimate to update the expected file
10  * for this test.
11 */
12 #if 1 || (1 / 0)
13 #endif
14