projects
/
cparser
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
reverted 21986-21986, spec failed
[cparser]
/
type.c
diff --git
a/type.c
b/type.c
index
99c73a9
..
a35aa44
100644
(file)
--- a/
type.c
+++ b/
type.c
@@
-435,7
+435,7
@@
static void print_array_type_post(const array_type_t *type)
static void print_bitfield_type_post(const bitfield_type_t *type)
{
fputs(" : ", out);
static void print_bitfield_type_post(const bitfield_type_t *type)
{
fputs(" : ", out);
- print_expression(type->size);
+ print_expression(type->size
_expression
);
intern_print_type_post(type->base_type, false);
}
intern_print_type_post(type->base_type, false);
}
@@
-747,6
+747,8
@@
type_t *duplicate_type(const type_t *type)
*/
type_t *get_unqualified_type(type_t *type)
{
*/
type_t *get_unqualified_type(type_t *type)
{
+ assert(!is_typeref(type));
+
if (type->base.qualifiers == TYPE_QUALIFIER_NONE)
return type;
if (type->base.qualifiers == TYPE_QUALIFIER_NONE)
return type;
@@
-931,9
+933,8
@@
bool is_type_arithmetic(const type_t *type)
*/
bool is_type_real(const type_t *type)
{
*/
bool is_type_real(const type_t *type)
{
- /* 6.2.5.17 */
- return is_type_integer(type)
- || (type->kind == TYPE_ATOMIC && is_type_float(type));
+ /* 6.2.5 (17) */
+ return is_type_integer(type) || is_type_float(type);
}
/**
}
/**
@@
-1024,6
+1025,9
@@
static bool function_types_compatible(const function_type_t *func1,
if (!types_compatible(ret1, ret2))
return false;
if (!types_compatible(ret1, ret2))
return false;
+ if (func1->calling_convention != func2->calling_convention)
+ return false;
+
/* can parameters be compared? */
if (func1->unspecified_parameters || func2->unspecified_parameters)
return true;
/* can parameters be compared? */
if (func1->unspecified_parameters || func2->unspecified_parameters)
return true;
@@
-1031,9
+1035,6
@@
static bool function_types_compatible(const function_type_t *func1,
if (func1->variadic != func2->variadic)
return false;
if (func1->variadic != func2->variadic)
return false;
- if (func1->calling_convention != func2->calling_convention)
- return false;
-
/* TODO: handling of unspecified parameters not correct yet */
/* all argument types must be compatible */
/* TODO: handling of unspecified parameters not correct yet */
/* all argument types must be compatible */