From: Michael Beck Date: Thu, 12 Jun 2008 11:26:09 +0000 (+0000) Subject: warns as it should, but crashes than X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=bc3b9811f71c19f9ac1ec19d148a3c288df91958;p=cparser warns as it should, but crashes than [r20077] --- 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; +}