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]

Re: Alignment cleanup


Am Mit, 19 Mär 2036 schrieb Richard Kenner:
>This causes a bootstrap fail on platforms with HANDLE_PRAGMA_PACK (eg.
>    powerpc-linux-gnu) due to a duplicate declaration with now colliding
>    return values. I attached the obvious fix.
>
>    OK to commit?
>
>Yes, thanks.

Actually, Chill is full of maximum_field_alignment :-(. It takes longer to
write the ChangeLog than to fix :-).

OK to commit?

Franz.

	* expr.c (compare_records): Delete maximum_field_alignment declaration.
	* inout.c (inout_init): Likewise.
	(build_chill_gettextaccess): Likewise.
	(build_enum_tables): Likewise.
	* lang.c: Likewise.
	* satisfy.c (satisfy): Likewise.
	* tasking.c (build_tasking_struct): Likewise.
	(build_tasking_message_type): Likewise.
	* typeck.c (build_init_struct): Likewise.

	* except.c (emit_setup_handler): Make save_maximum_field_alignment
	unsigned int to match maximum_field_alignment.
	* inout.c (inout_init): Likewise.
	(build_chill_gettextaccess): Likewise.
	(build_enum_tables): Likewise.
	* tasking.c (build_tasking_struct): Likewise.
	(build_tasking_message_type): Likewise.
	* typeck.c (build_init_struct): Likewise.

Index: except.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ch/except.c,v
retrieving revision 1.12
diff -u -p -r1.12 except.c
--- except.c	2000/02/10 23:13:17	1.12
+++ except.c	2000/02/10 23:28:29
@@ -396,7 +396,7 @@ emit_setup_handler ()
       /* We temporarily reset the maximum_field_alignment to zero so the
 	 compiler's exception data structures can be compatible with the
 	 run-time system, even when we're compiling with -fpack. */
-      int save_maximum_field_alignment = maximum_field_alignment;
+      unsigned int save_maximum_field_alignment = maximum_field_alignment;
       maximum_field_alignment = 0;
       push_obstacks_nochange ();
       end_temporary_allocation ();
Index: expr.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ch/expr.c,v
retrieving revision 1.15
diff -u -p -r1.15 expr.c
--- expr.c	2000/01/17 16:49:30	1.15
+++ expr.c	2000/02/10 23:28:38
@@ -3469,7 +3469,6 @@ compare_records (exp0, exp1)
   int have_variants = 0;
 
   tree result = boolean_true_node;
-  extern int maximum_field_alignment;
 
   if (TREE_CODE (type) != RECORD_TYPE)
     abort ();
Index: inout.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ch/inout.c,v
retrieving revision 1.12
diff -u -p -r1.12 inout.c
--- inout.c	2000/01/17 16:49:30	1.12
+++ inout.c	2000/02/10 23:28:40
@@ -1088,8 +1088,7 @@ inout_init ()
   /* We temporarily reset the maximum_field_alignment to zero so the
      compiler's init data structures can be compatible with the
      run-time system, even when we're compiling with -fpack. */
-  extern int maximum_field_alignment;
-  int save_maximum_field_alignment = maximum_field_alignment;
+  unsigned int save_maximum_field_alignment = maximum_field_alignment;
 
   extern tree chill_predefined_function_type;
   tree endlink = void_list_node;
@@ -2821,8 +2820,7 @@ build_chill_gettextaccess (text)
   tree access, refaccess, acc, decl, listbase;
   tree tlocmode, indexmode, dynamic;
   tree result;
-  extern int maximum_field_alignment;
-  int save_maximum_field_alignment = maximum_field_alignment;
+  unsigned int save_maximum_field_alignment = maximum_field_alignment;
 
   if (! check_text (text, 1, "GETTEXTACCESS"))
     return error_mark_node;
@@ -4590,8 +4588,7 @@ void build_enum_tables ()
   /* We temporarily reset the maximum_field_alignment to zero so the
      compiler's init data structures can be compatible with the
      run-time system, even when we're compiling with -fpack. */
-  extern int maximum_field_alignment;
-  int save_maximum_field_alignment;
+  unsigned int save_maximum_field_alignment;
     
   if (pass == 1)
     return;
Index: lang.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ch/lang.c,v
retrieving revision 1.11
diff -u -p -r1.11 lang.c
--- lang.c	2000/01/17 16:49:30	1.11
+++ lang.c	2000/02/10 23:28:41
@@ -50,8 +50,6 @@ int special_UC = 0;
 char* chill_real_input_filename;
 extern FILE* finput;
 
-extern int maximum_field_alignment;
-
 static int deep_const_expr			PARAMS ((tree));
 static void chill_print_error_function		PARAMS ((const char *));
 
Index: satisfy.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ch/satisfy.c,v
retrieving revision 1.10
diff -u -p -r1.10 satisfy.c
--- satisfy.c	2000/01/17 16:49:30	1.10
+++ satisfy.c	2000/02/10 23:28:41
@@ -533,8 +533,7 @@ satisfy (exp, chain)
 	    /* if we have an ACCESS or TEXT mode we have to set
 	       maximum_field_alignment to 0 to fit with runtime
 	       system, even when we compile with -fpack. */
-	    extern int maximum_field_alignment;
-	    int save_maximum_field_alignment = maximum_field_alignment;
+	    unsigned int save_maximum_field_alignment = maximum_field_alignment;
 
 	    if (CH_IS_ACCESS_MODE (exp) || CH_IS_TEXT_MODE (exp))
 	      maximum_field_alignment = 0;
Index: tasking.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ch/tasking.c,v
retrieving revision 1.14
diff -u -p -r1.14 tasking.c
--- tasking.c	2000/01/17 16:49:30	1.14
+++ tasking.c	2000/02/10 23:28:45
@@ -763,8 +763,7 @@ build_tasking_struct ()
   /* We temporarily reset the maximum_field_alignment to zero so the
      compiler's init data structures can be compatible with the
      run-time system, even when we're compiling with -fpack. */
-  extern int maximum_field_alignment;
-  int save_maximum_field_alignment = maximum_field_alignment;
+  unsigned int save_maximum_field_alignment = maximum_field_alignment;
   maximum_field_alignment = 0;
 
   decl1 = build_decl (FIELD_DECL, get_identifier ("TaskName"),
@@ -1239,8 +1238,7 @@ build_tasking_message_type ()
   tree temp;
   /* We temporarily reset maximum_field_alignment to deal with
      the runtime system. */
-  extern int maximum_field_alignment;
-  int save_maximum_field_alignment = maximum_field_alignment;
+  unsigned int save_maximum_field_alignment = maximum_field_alignment;
   tree field1, field2, field3;
 
   maximum_field_alignment = 0;
Index: typeck.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ch/typeck.c,v
retrieving revision 1.19
diff -u -p -r1.19 typeck.c
--- typeck.c	2000/01/17 16:49:30	1.19
+++ typeck.c	2000/02/10 23:28:48
@@ -2168,8 +2168,7 @@ build_init_struct ()
   /* We temporarily reset the maximum_field_alignment to zero so the
      compiler's init data structures can be compatible with the
      run-time system, even when we're compiling with -fpack. */
-  extern int maximum_field_alignment;
-  int save_maximum_field_alignment = maximum_field_alignment;
+  unsigned int save_maximum_field_alignment = maximum_field_alignment;
   maximum_field_alignment = 0;
 
   decl1 = build_decl (FIELD_DECL, get_identifier ("__INIT_ENTRY"),

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