From 6b64c6e319d41000c09f7cf28bc1f7975f389cdd Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Fri, 30 May 2008 14:30:36 +0000 Subject: [PATCH] add new shouldpass category [r19850] --- parsetest/shouldpass/README | 2 ++ parsetest/shouldpass/fewparams.c | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 parsetest/shouldpass/README create mode 100644 parsetest/shouldpass/fewparams.c diff --git a/parsetest/shouldpass/README b/parsetest/shouldpass/README new file mode 100644 index 0000000..f08a2cf --- /dev/null +++ b/parsetest/shouldpass/README @@ -0,0 +1,2 @@ +This directory contains testapps that exploit undefined behaviour, but should +pass for practical reasons. diff --git a/parsetest/shouldpass/fewparams.c b/parsetest/shouldpass/fewparams.c new file mode 100644 index 0000000..d0e2b62 --- /dev/null +++ b/parsetest/shouldpass/fewparams.c @@ -0,0 +1,16 @@ +static void foo(); + +static void kaputt(void) { + foo(1); +} + +static void foo(int a, int b) { + (void) a; + (void) b; + printf("%d %d\n", a, b); +} + +int main(void) { + kaputt(); + return 0; +} -- 2.20.1