summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2007-09-30 14:31:26 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2007-09-30 14:31:26 +0000
commit559ccea43a4ff24ef5d3b50a420f213faad7ed86 (patch)
tree145469bd0548dc07d778eb2c069e65f204d55cf0 /regress
parentcf3e5d5c45899c4bfcde570fa16ffcc9ca7cc157 (diff)
test case involving superfluous type warnings involving enums
Diffstat (limited to 'regress')
-rw-r--r--regress/usr.bin/pcc/cc/ccom/enum001.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/regress/usr.bin/pcc/cc/ccom/enum001.c b/regress/usr.bin/pcc/cc/ccom/enum001.c
new file mode 100644
index 00000000000..d46065e7434
--- /dev/null
+++ b/regress/usr.bin/pcc/cc/ccom/enum001.c
@@ -0,0 +1,21 @@
+/* code should produce exactly one warning */
+
+enum foo { bar };
+enum footoo { bar1 };
+
+enum foo f(void);
+double g(void);
+
+struct baz {
+ enum foo (*ff)(void);
+};
+
+struct baz a[] = { {f},
+ {g} };
+
+
+static int h(enum foo *);
+static int h(enum foo *arg)
+{
+ return 0;
+}