#include <stdlib.h>
#include <string.h>
-#include "../common/xmalloc.h"
+/* common */
+#include "check.h"
+#include "xmalloc.h"
+/* cc65 */
#include "asmcode.h"
#include "asmlabel.h"
-#include "check.h"
#include "codegen.h"
#include "datatype.h"
#include "declare.h"
rhs->e_tptr = lhst;
/* First, do some type checking */
- if (IsVoid (lhst) || IsVoid (rhst)) {
+ if (IsTypeVoid (lhst) || IsTypeVoid (rhst)) {
/* If one of the sides are of type void, output a more apropriate
* error message.
*/
/* Done */
goto end_array;
- } else if ((tptr2 = lval2.e_tptr) [0] & T_POINTER) {
+ } else if (IsPtr (tptr2 = lval2.e_tptr)) {
/* Subscript is pointer, get element type */
lval2.e_tptr = Indirect (tptr2);
}
/* Do the actual cast. Special handling for void casts */
- if (!IsVoid (Type)) {
+ if (!IsTypeVoid (Type)) {
/* Mark the lhs as const to avoid a manipulation of TOS */
g_typecast (TypeOf (Type) | CF_CONST, rflags);
}