more fixes for bitfield type
authorMatthias Braun <matze@braunis.de>
Sun, 1 Jun 2008 22:44:06 +0000 (22:44 +0000)
committerMatthias Braun <matze@braunis.de>
Sun, 1 Jun 2008 22:44:06 +0000 (22:44 +0000)
[r19912]

type.c

diff --git a/type.c b/type.c
index ba2938d..cc32ec4 100644 (file)
--- a/type.c
+++ b/type.c
@@ -748,6 +748,8 @@ bool is_type_integer(const type_t *type)
 
        if(type->kind == TYPE_ENUM)
                return true;
+       if(type->kind == TYPE_BITFIELD)
+               return true;
 
        if(type->kind != TYPE_ATOMIC)
                return false;
@@ -784,6 +786,8 @@ bool is_type_signed(const type_t *type)
        /* enum types are int for now */
        if(type->kind == TYPE_ENUM)
                return true;
+       if(type->kind == TYPE_BITFIELD)
+               return is_type_signed(type->bitfield.base_type);
 
        if(type->kind != TYPE_ATOMIC)
                return false;