class.c: Include target.h.
authorAlexandre Oliva <aoliva@redhat.com>
Tue, 5 Feb 2002 18:01:51 +0000 (18:01 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Tue, 5 Feb 2002 18:01:51 +0000 (18:01 +0000)
* class.c: Include target.h.
(check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
bit-field layout.
* Make-lang.in: Adjust deps.

From-SVN: r49527

gcc/cp/ChangeLog
gcc/cp/Make-lang.in
gcc/cp/class.c

index 76af2baadf5c37afa38039d1e2e612215f468267..5c463a776c882790f9058d68bdf48878e1318369 100644 (file)
@@ -1,3 +1,11 @@
+2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
+
+       * class.c: Include target.h.
+       (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
+       BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
+       bit-field layout.
+       * Make-lang.in: Adjust deps.
+
 2002-02-05  Jason Merrill  <jason@redhat.com>
 
        * error.c (dump_type): Be more helpful about VECTOR_TYPE.
index 6123612a35826e7969364e4ae004a228c79176ae..976559a8d298ee2d74132e6238c30dbe18c678ab 100644 (file)
@@ -262,7 +262,7 @@ cp/typeck2.o: cp/typeck2.c $(CXX_TREE_H) flags.h toplev.h output.h $(TM_P_H) \
    diagnostic.h
 cp/typeck.o: cp/typeck.c $(CXX_TREE_H) flags.h $(RTL_H) $(EXPR_H) toplev.h \
    diagnostic.h
-cp/class.o: cp/class.c $(CXX_TREE_H) flags.h toplev.h $(RTL_H)
+cp/class.o: cp/class.c $(CXX_TREE_H) flags.h toplev.h $(RTL_H) $(TARGET_H)
 cp/call.o: cp/call.c $(CXX_TREE_H) flags.h toplev.h $(RTL_H) $(EXPR_H) \
      $(GGC_H) diagnostic.h
 cp/friend.o: cp/friend.c $(CXX_TREE_H) flags.h $(RTL_H) toplev.h $(EXPR_H)
index 1e62c5928173693e0c843ad98985391f2e375358..c5e349cdc200f656df356bbae42f7149c27d742b 100644 (file)
@@ -33,6 +33,7 @@ Boston, MA 02111-1307, USA.  */
 #include "toplev.h"
 #include "ggc.h"
 #include "lex.h"
+#include "target.h"
 
 #include "obstack.h"
 #define obstack_chunk_alloc xmalloc
@@ -3106,7 +3107,8 @@ check_bitfield_decl (field)
       DECL_SIZE (field) = convert (bitsizetype, w);
       DECL_BIT_FIELD (field) = 1;
 
-      if (integer_zerop (w))
+      if (integer_zerop (w)
+         && ! (* targetm.ms_bitfield_layout_p) (DECL_FIELD_CONTEXT (field)))
        {
 #ifdef EMPTY_FIELD_BOUNDARY
          DECL_ALIGN (field) = MAX (DECL_ALIGN (field),