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]

c-pragma.c BITS_PER_UNIT tweak


Mark Mitchell pointed out that we should be using BITS_PER_UNIT instead.

Ok to commit?

2000-04-23  Mumit Khan  <khan@xraylith.wisc.edu>

	* c-pragma.c (push_alignment): Use BITS_PER_UNIT macro. 
	(pop_alignment): Likewise.
	(handle_pragma_token): Likewise.

Index: c-pragma.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/c-pragma.c,v
retrieving revision 1.32
diff -u -3 -p -u -p -r1.32 c-pragma.c
--- c-pragma.c	2000/03/07 11:41:15	1.32
+++ c-pragma.c	2000/04/24 02:38:39
@@ -98,7 +98,7 @@ Alignment must be a small power of two, 
       
       alignment_stack = entry;
 
-      maximum_field_alignment = alignment * 8;
+      maximum_field_alignment = alignment * BITS_PER_UNIT;
     }
   else
     alignment_stack->num_pushes ++;
@@ -145,7 +145,7 @@ pop_alignment (id)
       if (entry == NULL)
 	maximum_field_alignment = default_alignment;
       else
-	maximum_field_alignment = entry->alignment * 8;
+	maximum_field_alignment = entry->alignment * BITS_PER_UNIT;
 
       free (alignment_stack);
 
@@ -206,7 +206,7 @@ handle_pragma_token (string, token)
 	case ps_pack:
 	  if (state == ps_right)
 	    {
-	      maximum_field_alignment = align * 8;
+	      maximum_field_alignment = align * BITS_PER_UNIT;
 #ifdef HANDLE_PRAGMA_PACK_PUSH_POP
 	      default_alignment = maximum_field_alignment;
 #endif

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