* support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
* src/SDCCast.c (decorateType): fixed bug #846009
* src/ds390/peeph.def,
* src/ds390/gen.c (genAnd, genOr),
* src/mcs51/peeph.def,
* src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3027
4a8a32a2-be11-0410-ad9d-
d568d2c75423
+2003-11-26 Erik Petrich <epetrich@ivorytower.norman.ok.us>
+
+ * src/SDCC.y (pointer): fixed bug #846006
+ * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
+ * src/SDCCast.c (decorateType): fixed bug #846009
+ * src/ds390/peeph.def,
+ * src/ds390/gen.c (genAnd, genOr),
+ * src/mcs51/peeph.def,
+ * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
+
2003-11-25 Erik Petrich <epetrich@ivorytower.norman.ok.us>
Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
: unqualified_pointer { $$ = $1 ;}
| unqualified_pointer type_specifier_list
{
- $$ = $1 ;
- DCL_TSPEC($1) = $2;
- DCL_PTR_CONST($1) = SPEC_CONST($2);
- DCL_PTR_VOLATILE($1) = SPEC_VOLATILE($2);
+ $$ = $1 ;
+ if (IS_SPEC($2)) {
+ DCL_TSPEC($1) = $2;
+ DCL_PTR_CONST($1) = SPEC_CONST($2);
+ DCL_PTR_VOLATILE($1) = SPEC_VOLATILE($2);
+ }
+ else
+ werror (W_PTR_TYPE_INVALID);
}
| unqualified_pointer pointer
{
goto errorTreeReturn;
}
- if (SPEC_SCLS (tree->left->etype) == S_REGISTER)
+ if (LETYPE(tree) && SPEC_SCLS (tree->left->etype) == S_REGISTER)
{
werror (E_ILLEGAL_ADDR, "address of register variable");
goto errorTreeReturn;
werror (E_LVALUE_REQUIRED, "address of");
goto errorTreeReturn;
}
- if (SPEC_SCLS (tree->left->etype) == S_CODE)
+ if (!LETYPE (tree))
+ DCL_TYPE (p) = POINTER;
+ else if (SPEC_SCLS (tree->left->etype) == S_CODE)
DCL_TYPE (p) = CPOINTER;
else if (SPEC_SCLS (tree->left->etype) == S_XDATA)
DCL_TYPE (p) = FPOINTER;
{
if (ifx)
jmpTrueOrFalse (ifx, tlbl);
+ else
+ emitcode ("", "!tlabeldef", tlbl->key + 100);
goto release;
}
}
}
else if (ifx)
jmpTrueOrFalse (ifx, tlbl);
+ else
+ emitcode ("", "!tlabeldef", tlbl->key + 100);
}
else
{
}
else if (ifx)
jmpTrueOrFalse (ifx, tlbl);
+ else
+ emitcode ("", "!tlabeldef", tlbl->key + 100);
}
else
{
jz %4
%1:
} if labelRefCount %1 1
+
+replace {
+ jnz %1
+%1:
+} by {
+ ; Peephole 243a jump optimization
+} if labelRefCount %1 1
+
+replace {
+ jz %1
+%1:
+} by {
+ ; Peephole 243b jump optimization
+} if labelRefCount %1 1
{
if (ifx)
jmpTrueOrFalse (ifx, tlbl);
+ else
+ emitcode ("", "%05d$:", tlbl->key + 100);
goto release;
}
}
}
else if (ifx)
jmpTrueOrFalse (ifx, tlbl);
+ else
+ emitcode ("", "%05d$:", tlbl->key + 100);
}
else
{
}
else if (ifx)
jmpTrueOrFalse (ifx, tlbl);
+ else
+ emitcode ("", "%05d$:", tlbl->key + 100);
}
else
for (; (size--); offset++)
movx @dptr,a
}
+replace {
+ jnz %1
+%1:
+} by {
+ ; Peephole 249a jump optimization
+} if labelRefCount %1 1
+
+replace {
+ jz %1
+%1:
+} by {
+ ; Peephole 249b jump optimization
+} if labelRefCount %1 1
{ W_CONTROL_FLOW, ERROR_LEVEL_PEDANTIC,
"conditional flow changed by optimizer '%s(%d)':so said EVELYN the modified DOG" },
{ W_PTR_TYPE_INVALID, ERROR_LEVEL_WARNING,
- "invalid type specifier for pointer type specifier ignored" },
+ "invalid type specifier for pointer type; specifier ignored" },
{ W_IMPLICIT_FUNC, ERROR_LEVEL_WARNING,
"function '%s' implicit declaration" },
{ W_CONTINUE, ERROR_LEVEL_WARNING,