From bc3b9811f71c19f9ac1ec19d148a3c288df91958 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Thu, 12 Jun 2008 11:26:09 +0000 Subject: [PATCH] warns as it should, but crashes than [r20077] --- parsetest/should_warn/return_with_void.c | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 parsetest/should_warn/return_with_void.c diff --git a/parsetest/should_warn/return_with_void.c b/parsetest/should_warn/return_with_void.c new file mode 100644 index 0000000..9c7a1f6 --- /dev/null +++ b/parsetest/should_warn/return_with_void.c @@ -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; +} -- 2.20.1