aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/glcpp/tests/136-plus-plus-and-minus-minus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/glsl/glcpp/tests/136-plus-plus-and-minus-minus.c')
-rw-r--r--src/compiler/glsl/glcpp/tests/136-plus-plus-and-minus-minus.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/compiler/glsl/glcpp/tests/136-plus-plus-and-minus-minus.c b/src/compiler/glsl/glcpp/tests/136-plus-plus-and-minus-minus.c
new file mode 100644
index 00000000000..167d3c8a3cf
--- /dev/null
+++ b/src/compiler/glsl/glcpp/tests/136-plus-plus-and-minus-minus.c
@@ -0,0 +1,8 @@
+/* The body can include C expressions with ++ and -- */
+a = x++;
+b = ++x;
+c = x--;
+d = --x;
+/* But these are not legal in preprocessor expressions. */
+#if x++ > 4
+#endif