mirror of
https://github.com/cc65/cc65.git
synced 2025-04-08 19:38:55 +00:00
Fixed TypeHasAttrData(), GetSignedType() and GetUnsignedType(), none in use yet though.
This commit is contained in:
parent
45da20e770
commit
e57c409894
@ -63,6 +63,8 @@
|
||||
const Type type_char[] = { TYPE(T_CHAR), TYPE(T_END) };
|
||||
const Type type_schar[] = { TYPE(T_SCHAR), TYPE(T_END) };
|
||||
const Type type_uchar[] = { TYPE(T_UCHAR), TYPE(T_END) };
|
||||
const Type type_short[] = { TYPE(T_SHORT), TYPE(T_END) };
|
||||
const Type type_ushort[] = { TYPE(T_USHORT), TYPE(T_END) };
|
||||
const Type type_int[] = { TYPE(T_INT), TYPE(T_END) };
|
||||
const Type type_uint[] = { TYPE(T_UINT), TYPE(T_END) };
|
||||
const Type type_long[] = { TYPE(T_LONG), TYPE(T_END) };
|
||||
@ -727,8 +729,10 @@ const Type* GetSignedType (const Type* T)
|
||||
case T_RANK_CHAR:
|
||||
return type_schar;
|
||||
|
||||
case T_RANK_INT:
|
||||
case T_RANK_SHORT:
|
||||
return type_short;
|
||||
|
||||
case T_RANK_INT:
|
||||
return type_int;
|
||||
|
||||
case T_RANK_LONG:
|
||||
@ -749,8 +753,10 @@ const Type* GetUnsignedType (const Type* T)
|
||||
case T_RANK_CHAR:
|
||||
return type_uchar;
|
||||
|
||||
case T_RANK_INT:
|
||||
case T_RANK_SHORT:
|
||||
return type_ushort;
|
||||
|
||||
case T_RANK_INT:
|
||||
return type_uint;
|
||||
|
||||
case T_RANK_LONG:
|
||||
@ -979,7 +985,11 @@ int HasUnknownSize (const Type* T)
|
||||
int TypeHasAttrData (const Type* T)
|
||||
/* Return true if the given type has attribute data */
|
||||
{
|
||||
return IsClassStruct (T) || IsTypeArray (T) || IsClassFunc (T);
|
||||
return IsClassStruct (T) ||
|
||||
IsTypeArray (T) ||
|
||||
IsClassFunc (T) ||
|
||||
IsTypeVoid (T) ||
|
||||
IsTypeBitField (T);
|
||||
}
|
||||
|
||||
|
||||
|
@ -215,6 +215,8 @@ struct Type {
|
||||
extern const Type type_char[];
|
||||
extern const Type type_schar[];
|
||||
extern const Type type_uchar[];
|
||||
extern const Type type_short[];
|
||||
extern const Type type_ushort[];
|
||||
extern const Type type_int[];
|
||||
extern const Type type_uint[];
|
||||
extern const Type type_long[];
|
||||
|
Loading…
x
Reference in New Issue
Block a user