Restrict cast types
This commit is contained in:
@ -35,7 +35,7 @@ namespace elna::gcc
|
||||
bool is_integral_type(tree type)
|
||||
{
|
||||
gcc_assert(TYPE_P(type));
|
||||
return TREE_CODE(type) == INTEGER_TYPE;
|
||||
return TREE_CODE(type) == INTEGER_TYPE && type != elna_char_type_node;
|
||||
}
|
||||
|
||||
bool is_numeric_type(tree type)
|
||||
@ -43,6 +43,14 @@ namespace elna::gcc
|
||||
return is_integral_type(type) || type == elna_float_type_node;
|
||||
}
|
||||
|
||||
bool is_primitive_type(tree type)
|
||||
{
|
||||
gcc_assert(TYPE_P(type));
|
||||
return TREE_CODE(type) == INTEGER_TYPE
|
||||
|| type == elna_float_type_node
|
||||
|| type == elna_bool_type_node;
|
||||
}
|
||||
|
||||
bool is_array_type(tree type)
|
||||
{
|
||||
gcc_assert(TYPE_P(type));
|
||||
|
Reference in New Issue
Block a user