2007-02-10 Borut Razem <borut.razem AT siol.net>
- * src/SDCC.y: fixed bug #1159134: invalid duplicate declarations with
- same scope, this time for real ;-)
+ * src/SDCCsymt.c: fixed bug #1159134: invalid duplicate declarations
+ with same scope
+ * support/regression/tests/bug-1654060.c: added regression test for
+ #1654060
2007-02-09 Bernhard Held <bernhard AT bernhardheld.de>
2007-02-09 Borut Razem <borut.razem AT siol.net>
- * src/SDCC.y: fixed bug #1159134: invalid duplicate declarations with
- same scope
+ * src/SDCC.y: fixed bug #1654060 typedef within function causes
+ syntax error
2007-02-07 Maarten Brock <sourceforge.brock AT dse.nl>
if ((csym = findSymWithLevel (SymbolTab, sym)) &&
csym->level == sym->level)
{
- /* if not in file scope then show symbol redefined error
+ /* if not formal parameter and not in file scope
+ then show symbol redefined error
else check if symbols have conpatible types */
- if (sym->level > 0)
+ if (!sym->_isparm && sym->level > 0)
error = 1;
else
{
--- /dev/null
+/*\r
+ bug-1654060.c\r
+\r
+ typedef within function causes syntax error\r
+*/\r
+\r
+#include <testfwk.h>\r
+typedef char mytype1;\r
+typedef int mytype2;\r
+\r
+mytype1 c1 = 'A';\r
+mytype2 i1 = 12345;\r
+\r
+void testTypedef(void)\r
+{\r
+ typedef int mytype1;\r
+ typedef char mytype2;\r
+\r
+ mytype1 i2 = 21435;\r
+ mytype2 c2 = 'B';\r
+\r
+ ASSERT(c1 == 'A');\r
+ ASSERT(i1 == 12345);\r
+ ASSERT(c1 == 'B');\r
+ ASSERT(i1 == 21435);\r
+}\r