diff --git a/src/cc65/datatype.c b/src/cc65/datatype.c index 9e0652526..46f62e922 100644 --- a/src/cc65/datatype.c +++ b/src/cc65/datatype.c @@ -216,7 +216,7 @@ unsigned BitSizeOf (const Type* T) unsigned SizeOf (const Type* T) /* Compute size (in bytes) of object represented by type array */ { - switch (GetUnqualTypeCode (T)) { + switch (GetUnderlyingTypeCode (T)) { case T_VOID: /* A void variable is a cc65 extension. @@ -368,7 +368,7 @@ static unsigned GetMinimalTypeSizeByBitWidth (unsigned BitWidth) -TypeCode GetUnqualTypeCode (const Type* Type) +TypeCode GetUnderlyingTypeCode (const Type* Type) /* Get the type code of the unqualified underlying type of Type. ** Return GetUnqualRawTypeCode (Type) if Type is not scalar. */ @@ -725,7 +725,7 @@ const Type* ArithmeticConvert (const Type* lhst, const Type* rhst) const Type* GetSignedType (const Type* T) /* Get signed counterpart of the integral type */ { - switch (GetUnqualTypeCode (T) & T_MASK_RANK) { + switch (GetUnderlyingTypeCode (T) & T_MASK_RANK) { case T_RANK_CHAR: return type_schar; @@ -739,7 +739,7 @@ const Type* GetSignedType (const Type* T) return type_long; default: - Internal ("Unknown type code: %lX", GetUnqualTypeCode (T)); + Internal ("Unknown type code: %lX", GetUnderlyingTypeCode (T)); return T; } } @@ -749,7 +749,7 @@ const Type* GetSignedType (const Type* T) const Type* GetUnsignedType (const Type* T) /* Get unsigned counterpart of the integral type */ { - switch (GetUnqualTypeCode (T) & T_MASK_RANK) { + switch (GetUnderlyingTypeCode (T) & T_MASK_RANK) { case T_RANK_CHAR: return type_uchar; @@ -763,7 +763,7 @@ const Type* GetUnsignedType (const Type* T) return type_ulong; default: - Internal ("Unknown type code: %lX", GetUnqualTypeCode (T)); + Internal ("Unknown type code: %lX", GetUnderlyingTypeCode (T)); return T; } } diff --git a/src/cc65/datatype.h b/src/cc65/datatype.h index 4f4b6f25e..dbe0eedaa 100644 --- a/src/cc65/datatype.h +++ b/src/cc65/datatype.h @@ -328,7 +328,7 @@ INLINE TypeCode GetQualifier (const Type* T) # define GetQualifier(T) ((T)->C & T_MASK_QUAL) #endif -TypeCode GetUnqualTypeCode (const Type* Type); +TypeCode GetUnderlyingTypeCode (const Type* Type); /* Get the type code of the unqualified underlying type of Type. ** Return GetUnqualRawTypeCode (Type) if Type is not scalar. */ @@ -359,30 +359,30 @@ INLINE TypeCode GetTypeClass (const Type* T) INLINE TypeCode GetTypeRank (const Type* T) /* Get the type rank of a type */ { - return (GetUnqualTypeCode (T) & T_MASK_RANK); + return (GetUnderlyingTypeCode (T) & T_MASK_RANK); } #else -# define GetTypeRank(T) (GetUnqualTypeCode (T) & T_MASK_RANK) +# define GetTypeRank(T) (GetUnderlyingTypeCode (T) & T_MASK_RANK) #endif #if defined(HAVE_INLINE) INLINE TypeCode GetSignedness (const Type* T) /* Get the signedness of a type */ { - return (GetUnqualTypeCode (T) & T_MASK_SIGN); + return (GetUnderlyingTypeCode (T) & T_MASK_SIGN); } #else -# define GetSignedness(T) (GetUnqualTypeCode (T) & T_MASK_SIGN) +# define GetSignedness(T) (GetUnderlyingTypeCode (T) & T_MASK_SIGN) #endif #if defined(HAVE_INLINE) INLINE TypeCode GetSizeModifier (const Type* T) /* Get the size modifier of a type */ { - return (GetUnqualTypeCode (T) & T_MASK_SIZE); + return (GetUnderlyingTypeCode (T) & T_MASK_SIZE); } #else -# define GetSizeModifier(T) (GetUnqualTypeCode (T) & T_MASK_SIZE) +# define GetSizeModifier(T) (GetUnderlyingTypeCode (T) & T_MASK_SIZE) #endif #if defined(HAVE_INLINE) diff --git a/src/cc65/expr.c b/src/cc65/expr.c index cfddfa24e..0f3a6e110 100644 --- a/src/cc65/expr.c +++ b/src/cc65/expr.c @@ -129,7 +129,7 @@ unsigned CG_TypeOf (const Type* T) { unsigned CG_Type; - switch (GetUnqualTypeCode (T)) { + switch (GetUnderlyingTypeCode (T)) { case T_SCHAR: return CF_CHAR; @@ -188,7 +188,7 @@ unsigned CG_TypeOf (const Type* T) unsigned CG_CallFlags (const Type* T) /* Get the code generator flags for calling the function */ { - if (GetUnqualTypeCode (T) == T_FUNC) { + if (GetUnderlyingTypeCode (T) == T_FUNC) { return (T->A.F->Flags & FD_VARIADIC) ? 0 : CF_FIXARGC; } else { Error ("Illegal function type %04lX", T->C); @@ -291,7 +291,7 @@ static unsigned typeadjust (ExprDesc* lhs, const ExprDesc* rhs, int NoPush) void LimitExprValue (ExprDesc* Expr, int WarnOverflow) /* Limit the constant value of the expression to the range of its type */ { - switch (GetUnqualTypeCode (Expr->Type)) { + switch (GetUnderlyingTypeCode (Expr->Type)) { case T_INT: case T_SHORT: if (WarnOverflow && ((Expr->IVal < -0x8000) || (Expr->IVal > 0x7FFF))) { diff --git a/src/cc65/initdata.c b/src/cc65/initdata.c index 5401e577c..82cebefc2 100644 --- a/src/cc65/initdata.c +++ b/src/cc65/initdata.c @@ -679,7 +679,7 @@ static unsigned ParseVoidInit (Type* T) Size = 0; do { ExprDesc Expr = NoCodeConstExpr (hie1); - switch (GetUnqualTypeCode (&Expr.Type[0])) { + switch (GetUnderlyingTypeCode (&Expr.Type[0])) { case T_SCHAR: case T_UCHAR: @@ -747,7 +747,7 @@ static unsigned ParseVoidInit (Type* T) static unsigned ParseInitInternal (Type* T, int *Braces, int AllowFlexibleMembers) /* Parse initialization of variables. Return the number of data bytes. */ { - switch (GetUnqualTypeCode (T)) { + switch (GetUnderlyingTypeCode (T)) { case T_SCHAR: case T_UCHAR: diff --git a/src/cc65/typecmp.c b/src/cc65/typecmp.c index e8b790a69..a09c80304 100644 --- a/src/cc65/typecmp.c +++ b/src/cc65/typecmp.c @@ -259,8 +259,8 @@ static void DoCompare (const Type* lhs, const Type* rhs, typecmp_t* Result) } /* Get the ranks of the left and right hands */ - LeftRank = (GetUnqualTypeCode (lhs) & T_MASK_RANK); - RightRank = (GetUnqualTypeCode (rhs) & T_MASK_RANK); + LeftRank = (GetUnderlyingTypeCode (lhs) & T_MASK_RANK); + RightRank = (GetUnderlyingTypeCode (rhs) & T_MASK_RANK); /* Bit-fields are considered compatible if they have the same ** signedness, bit-offset and bit-width. @@ -344,10 +344,10 @@ static void DoCompare (const Type* lhs, const Type* rhs, typecmp_t* Result) case T_RANK_PTR: ++Result->Indirections; if (Result->Indirections == 1) { - if ((GetUnqualTypeCode (lhs + 1) & T_MASK_RANK) == T_RANK_VOID) { + if ((GetUnderlyingTypeCode (lhs + 1) & T_MASK_RANK) == T_RANK_VOID) { Result->F |= TCF_VOID_PTR_ON_LEFT; } - if ((GetUnqualTypeCode (rhs + 1) & T_MASK_RANK) == T_RANK_VOID) { + if ((GetUnderlyingTypeCode (rhs + 1) & T_MASK_RANK) == T_RANK_VOID) { Result->F |= TCF_VOID_PTR_ON_RIGHT; } } else { diff --git a/src/cc65/typeconv.c b/src/cc65/typeconv.c index 25b693511..6e9fad69a 100644 --- a/src/cc65/typeconv.c +++ b/src/cc65/typeconv.c @@ -436,7 +436,7 @@ void TypeComposition (Type* lhs, const Type* rhs) } /* Check for sanity */ - CHECK (GetUnqualTypeCode (lhs) == GetUnqualTypeCode (rhs)); + CHECK (GetUnderlyingTypeCode (lhs) == GetUnderlyingTypeCode (rhs)); /* Check for special type elements */ if (IsTypeFunc (lhs)) {