From 693e3a710970627baf4ff30bdc6da19b448ab3ad Mon Sep 17 00:00:00 2001 From: mrdudz Date: Mon, 13 Jul 2020 15:12:04 +0200 Subject: [PATCH] added testcase for issue #1048 --- test/misc/bug1048.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/misc/bug1048.c diff --git a/test/misc/bug1048.c b/test/misc/bug1048.c new file mode 100644 index 000000000..d022474d6 --- /dev/null +++ b/test/misc/bug1048.c @@ -0,0 +1,15 @@ +/* bug #1048: The following code has two errors: a redeclared enum type and an + undeclared enum type: */ + +#include + +// this should NOT compile - but with cc65 it does +enum e { x }; +enum e { y }; + +int f() { return sizeof(enum undeclared); } + +int main(void) +{ + return EXIT_SUCCESS; +}