fix union init problems
[cparser] / entity_t.h
index 374d283..09a1550 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * This file is part of cparser.
- * Copyright (C) 2007-2008 Matthias Braun <matze@braunis.de>
+ * Copyright (C) 2007-2009 Matthias Braun <matze@braunis.de>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -125,9 +125,10 @@ struct compound_t {
        entity_t         *alias; /* used for name mangling of anonymous types */
        scope_t           members;
        decl_modifiers_t  modifiers;
-       bool              complete            : 1;
-       bool              transparent_union   : 1;
-       bool              packed              : 1;
+       bool              layouted          : 1;
+       bool              complete          : 1;
+       bool              transparent_union : 1;
+       bool              packed            : 1;
 
        il_alignment_t    alignment;
        il_size_t         size;
@@ -194,13 +195,14 @@ struct declaration_t {
 };
 
 struct compound_member_t {
-       declaration_t    base;
-       bool             read          : 1;
-       bool             address_taken : 1;  /**< Set if the address of this declaration was taken. */
+       declaration_t  base;
+       bool           read          : 1;
+       bool           address_taken : 1;  /**< Set if the address of this declaration was taken. */
+       unsigned short offset;     /**< the offset of this member in the compound */
+       unsigned char  bit_offset; /**< extra bit offset for bitfield members */
 
        /* ast2firm info */
        ir_entity *entity;
-       il_size_t  offset;  /**< The offset of this member inside a compound. */
 };
 
 struct variable_t {
@@ -301,7 +303,7 @@ struct function_t {
        statement_t   *statement;
 
        /* ast2firm info */
-       ir_entity     *entity;
+       ir_entity     *irentity;
        ir_node       *static_link;        /**< if need_closure is set, the node representing
                                                                                    the static link. */
 };