warns as it should, but crashes than
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Thu, 12 Jun 2008 11:26:09 +0000 (11:26 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Thu, 12 Jun 2008 11:26:09 +0000 (11:26 +0000)
[r20077]

parsetest/should_warn/return_with_void.c [new file with mode: 0644]

diff --git a/parsetest/should_warn/return_with_void.c b/parsetest/should_warn/return_with_void.c
new file mode 100644 (file)
index 0000000..9c7a1f6
--- /dev/null
@@ -0,0 +1,11 @@
+void test(unsigned a, unsigned b) {
+       unsigned x = a - b;
+       if (a >= b)
+               return x;
+       return 0;
+}
+
+int main(int argc, char *argv[]) {
+       test(3,4);
+       return 0;
+}