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]

Fix unwind-dw2-darwin.c: Tester for Patch needed



The native darwin tester complained about Zack and my combined patch
since bootstrap now fails:

./xgcc -B./ -B/Users/regress/tbox/objs/powerpc-apple-darwin6.3/bin/ -isystem /Users/regress/tbox/objs/powerpc-apple-darwin6.3/include -isystem /Users/regress/tbox/objs/powerpc-apple-darwin6.3/sys-include -L/Users/regress/tbox/native/build/gcc/../ld -O2  -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include   -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -I. -I -I/Users/regress/tbox/cvs-gcc/gcc/gcc -I/Users/regress/tbox/cvs-gcc/gcc/gcc/ -I/Users/regress/tbox/cvs-gcc/gcc/gcc/../include -I../intl -fexceptions -c /Users/regress/tbox/cvs-gcc/gcc/gcc/unwind-dw2-fde-darwin.c -o libgcc/./unwind-dw2-fde-darwin.o
In file included from /Users/regress/tbox/cvs-gcc/gcc/gcc/unwind-dw2-fde-darwin.c:48:
/Users/regress/tbox/cvs-gcc/gcc/gcc/unwind-dw2-fde.c:972: error: conflicting types for '_Unwind_Find_registered_FDE'
/Users/regress/tbox/cvs-gcc/gcc/gcc/unwind-dw2-fde-darwin.c:45: error: previous declaration of '_Unwind_Find_registered_FDE'
/Users/regress/tbox/cvs-gcc/gcc/gcc/unwind-dw2-fde-darwin.c: In function `examine_objects':

/Users/regress/tbox/cvs-gcc/gcc/gcc/unwind-dw2-fde-darwin.c:186: warning: assignment discards qualifiers from pointer target type
/Users/regress/tbox/cvs-gcc/gcc/gcc/unwind-dw2-fde-darwin.c: At top level:

/Users/regress/tbox/cvs-gcc/gcc/gcc/unwind-dw2-fde-darwin.c:234: error: conflicting types for '_Unwind_Find_FDE'
/Users/regress/tbox/cvs-gcc/gcc/gcc/unwind-dw2-fde.h:166: error: previous declaration of '_Unwind_Find_FDE'
/Users/regress/tbox/cvs-gcc/gcc/gcc/unwind-dw2-fde-darwin.c: In function `_Unwind_Find_FDE':

/Users/regress/tbox/cvs-gcc/gcc/gcc/unwind-dw2-fde-darwin.c:248: warning: assignment discards qualifiers from pointer target type

The appended patch should fix these - and I hope does not introduce
new warnings.  Can anybody test the patch for me, please?

Thanks,
Andreas 

2003-11-01  Andreas Jaeger  <aj@suse.de>

	* unwind-dw2-fde-darwin.c: Adjust prototype of
	_Unwind_Find_registered_FDE for recent changes.
	(examine_objects): Constify return value and local variable result.
	(_Unwind_Find_FDE): Constify return value and local variable ret.

============================================================
Index: gcc/unwind-dw2-fde-darwin.c
--- gcc/unwind-dw2-fde-darwin.c	14 Jul 2003 23:04:30 -0000	1.6
+++ gcc/unwind-dw2-fde-darwin.c	1 Nov 2003 06:21:51 -0000
@@ -41,8 +41,8 @@ typedef int __gthread_mutex_t;
 #define __gthread_mutex_lock(x)  (void)(x)
 #define __gthread_mutex_unlock(x) (void)(x)
 
-static fde * _Unwind_Find_registered_FDE (void *pc, 
-					  struct dwarf_eh_bases *bases);
+static const fde * _Unwind_Find_registered_FDE (void *pc, 
+						struct dwarf_eh_bases *bases);
 
 #define _Unwind_Find_FDE _Unwind_Find_registered_FDE
 #include "unwind-dw2-fde.c"
@@ -137,10 +137,10 @@ live_image_destructor (struct live_image
    check whether the PC is inside the FDE of each unseen image.
  */
  
-static inline fde *
+static inline const fde *
 examine_objects (void *pc, struct dwarf_eh_bases *bases, int dont_alloc)
 {
-  fde *result = NULL;
+  const fde *result = NULL;
   struct live_images *image;
 
   image = _keymgr_get_and_lock_processwide_ptr (KEYMGR_GCC3_LIVE_IMAGE_LIST);
@@ -229,11 +229,11 @@ examine_objects (void *pc, struct dwarf_
   return result;
 }
 
-fde *
+const fde *
 _Unwind_Find_FDE (void *pc, struct dwarf_eh_bases *bases)
 {
   struct km_object_info *the_obj_info;
-  fde *ret = NULL;
+  const fde *ret = NULL;
 
   the_obj_info = 
     _keymgr_get_and_lock_processwide_ptr (KEYMGR_GCC3_DW2_OBJ_LIST);

-- 
 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
  SuSE Linux AG, Deutschherrnstr. 15-19, 90429 Nürnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126

Attachment: pgp00000.pgp
Description: PGP signature


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