This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: fix cast-to-int problem in unwind-dw2.c
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Richard Henderson <rth at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 7 May 2003 22:14:32 -0400
- Subject: Re: fix cast-to-int problem in unwind-dw2.c
- References: <20030507220114.GA27610@redhat.com>
On Wed, May 07, 2003 at 03:01:14PM -0700, Richard Henderson wrote:
> Introduced here:
>
> 2003-04-19 Kean Johnston <jkj@sco.com>
>
> * unwind-dw2.c (_Unwind_GetCFA): cast return to avoid warning
>
> I guess I missed it in the review.
>
>
> r~
>
>
> * unwind-dw2.c (_Unwind_GetCFA): Cast pointer to _Unwind_Ptr,
> not _Unwind_Word.
In a function which returns an _Unwind_Word? Won't that re-introduce
the warning somewhere?
>
> Index: unwind-dw2.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/unwind-dw2.c,v
> retrieving revision 1.29
> diff -c -p -d -u -r1.29 unwind-dw2.c
> --- unwind-dw2.c 6 May 2003 17:28:37 -0000 1.29
> +++ unwind-dw2.c 7 May 2003 22:01:18 -0000
> @@ -178,7 +178,7 @@ _Unwind_GetGR (struct _Unwind_Context *c
> _Unwind_Word
> _Unwind_GetCFA (struct _Unwind_Context *context)
> {
> - return (_Unwind_Word)context->cfa;
> + return (_Unwind_Ptr) context->cfa;
> }
>
> /* Overwrite the saved value for register REG in CONTEXT with VAL. */
>
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer