From 263b2264c22a32cc48f0737048ecd171f0d00bb3 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Fri, 12 Sep 2008 23:47:13 +0000 Subject: [PATCH] testcase for -Wtraditional [r21919] --- parsetest/should_warn/traditional.c | 35 +++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 parsetest/should_warn/traditional.c diff --git a/parsetest/should_warn/traditional.c b/parsetest/should_warn/traditional.c new file mode 100644 index 0000000..75919eb --- /dev/null +++ b/parsetest/should_warn/traditional.c @@ -0,0 +1,35 @@ +/*$ -Wtraditional $*/ + +int t1(int a) { return a; } +int t2(double a) { return a; } +int t3(char a) { return a; } + +int x() { + int i = +3; + return t1(0.0) + t2(0) + t3('a'); +} + +int sw1(long x) { + switch(x) { + default: return x; + } +} + +int sw2(unsigned x) { + switch(x) { + default: return x; + } +} + +char *str() { + return "a" "b"; +} + +int suff(void); + +int suff() { + unsigned a = 1U; + float f = 1.0F; + double d = 1.0L; + unsigned long long bla = 1ULL; +} -- 2.20.1