summaryrefslogtreecommitdiffstats
path: root/src/glsl/glcpp/tests/094-divide-by-zero-short-circuit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/glcpp/tests/094-divide-by-zero-short-circuit.c')
-rw-r--r--src/glsl/glcpp/tests/094-divide-by-zero-short-circuit.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/glsl/glcpp/tests/094-divide-by-zero-short-circuit.c b/src/glsl/glcpp/tests/094-divide-by-zero-short-circuit.c
index a9c6f36def8..04497b17913 100644
--- a/src/glsl/glcpp/tests/094-divide-by-zero-short-circuit.c
+++ b/src/glsl/glcpp/tests/094-divide-by-zero-short-circuit.c
@@ -1,2 +1,13 @@
+/* glcpp is generating a division-by-zero error for this case. It's
+ * easy to argue that it should be short-circuiting the evaluation and
+ * not generating the diagnostic (which happens to be what gcc does).
+ * But it doesn't seem like we should force this behavior on our
+ * pre-processor, (and, as always, the GLSL specification of the
+ * pre-processor is too vague on this point).
+ *
+ * If a short-circuit evaluation optimization does get added to the
+ * pre-processor then it would legitimate to update the expected file
+ * for this test.
+*/
#if 1 || (1 / 0)
#endif