aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/cast_expressions.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/cast_expressions.sh b/tests/cast_expressions.sh
index f6824ad..b493e04 100644
--- a/tests/cast_expressions.sh
+++ b/tests/cast_expressions.sh
@@ -152,3 +152,20 @@ int main() {
return 0;
}
EOF
+
+cat <<'EOF' > expected
+42
+EOF
+test_diff <<'EOF'
+int printf(const char*, ...);
+
+int f() {
+ return printf("42\n");
+}
+
+int main() {
+ (void)123;
+ (void)(5 + 6 + 7);
+ (void)f();
+}
+EOF