This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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]

Type-punning in tc-ia64.c


This fixes a warning from gcc about unsafe type-punning.

Andreas.

2003-03-20  Andreas Schwab  <schwab at suse dot de>

	* config/tc-ia64.c (generate_unwind_image): Fix type of unw_rec to
	avoid aliasing issue.

--- gas/config/tc-ia64.c.~1.81.~	2003-03-13 11:14:20.000000000 +0100
+++ gas/config/tc-ia64.c	2003-03-20 14:56:06.000000000 +0100
@@ -3261,14 +3261,14 @@ generate_unwind_image (text_name)
      const char *text_name;
 {
   int size;
-  unsigned char *unw_rec;
+  void *unw_rec;
 
   /* Force out pending instructions, to make sure all unwind records have
      a valid slot_number field.  */
   ia64_flush_insns ();
 
   /* Generate the unwind record.  */
-  size = output_unw_records (unwind.list, (void **) &unw_rec);
+  size = output_unw_records (unwind.list, &unw_rec);
   if (size % md.pointer_size != 0)
     as_bad ("Unwind record is not a multiple of %d bytes.", md.pointer_size);
 

-- 
Andreas Schwab, SuSE Labs, schwab at suse dot de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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