This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bit-field patch, part 1


Hi DJ,

> > Before I do that, is libiberty necessary for embedded targets?  On
> > h8, people generally use newlib (or some others like uClibc), and I
> > don't think newlib depends on libiberty, does it?  We could probably
> > skip building it!?
> 
> You could, but that would be wrong.  It's not an H8-specific problem,
> it's a generic problem.  It needs a generic solution.

How about something like this?  h8300-hms is buildable again.

Kazu Hirata

2003-12-18  Kazu Hirata  <kazu@cs.umass.edu>

	* include/fibheap.h (fibnode): Use unsigned long int for
	bit-fields if __GNUC__ is defined.

Index: fibheap.h
===================================================================
RCS file: /cvs/gcc/gcc/include/fibheap.h,v
retrieving revision 1.5
diff -u -r1.5 fibheap.h
--- fibheap.h	25 Jun 2002 00:14:15 -0000	1.5
+++ fibheap.h	19 Dec 2003 02:07:25 -0000
@@ -59,8 +59,13 @@
   struct fibnode *right;
   fibheapkey_t key;
   void *data;
+#ifdef __GNUC__
+  unsigned long int degree : 31;
+  unsigned long int mark : 1;
+#else
   unsigned int degree : 31;
   unsigned int mark : 1;
+#endif
 } *fibnode_t;
 
 extern fibheap_t fibheap_new PARAMS ((void));


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]