This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix compile time warning message in libgcc2's CFA code.
- To: gcc-patches at gcc dot gnu dot org
- Subject: Fix compile time warning message in libgcc2's CFA code.
- From: Nick Clifton <nickc at cygnus dot com>
- Date: Mon, 10 Jul 2000 09:57:07 -0700
Hi Guys,
The current gcc sources are producing a compile time warning when
building libgcc2:
gcc/libgcc2.c: In function `next_stack_level':
gcc/libgcc2.c:3659: warning: assignment makes pointer from integer without a cast
The patch below fixes this. There are lots of casts going on in the
expression, but I think that it is now correct.
Is it OK to apply ?
Cheers
Nick
2000-07-10 Nick Clifton <nickc@cygnus.com>
* libgcc2.c (next_stack_level): Cast result of indirect CFA
calculation back to void *.
Index: gcc/libgcc2.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/libgcc2.c,v
retrieving revision 1.97
diff -p -r1.97 libgcc2.c
*** libgcc2.c 2000/06/26 20:15:07 1.97
--- libgcc2.c 2000/07/10 16:53:40
*************** next_stack_level (void *pc, frame_state
*** 3712,3719 ****
else
caller_udata->cfa = udata->cfa;
if (caller_udata->indirect)
! caller_udata->cfa = *(word_type *)((unsigned char *)caller_udata->cfa
! + caller_udata->base_offset);
caller_udata->cfa += caller_udata->cfa_offset;
return caller_udata;
--- 3712,3719 ----
else
caller_udata->cfa = udata->cfa;
if (caller_udata->indirect)
! caller_udata->cfa = (void *) *(word_type *)((unsigned char *)caller_udata->cfa
! + caller_udata->base_offset);
caller_udata->cfa += caller_udata->cfa_offset;
return caller_udata;