diff options
author | Kaz Kojima <kkojima@gcc.gnu.org> | 2005-06-29 01:45:37 +0000 |
---|---|---|
committer | Kaz Kojima <kkojima@gcc.gnu.org> | 2005-06-29 01:45:37 +0000 |
commit | 4f1eb6e36fc151e6603f09d5ba9996e9f1e8ec3b (patch) | |
tree | 1e791f5368bf4adda24b18546e2892b365ab27c3 | |
parent | b48f503c9806fab41f3a9e484822b5b00dd31e0a (diff) | |
download | gcc-4f1eb6e36fc151e6603f09d5ba9996e9f1e8ec3b.tar.gz |
linux-unwind.h (shmedia_fallback_frame_state): Disable aliasing warning with void * cast.
* config/sh/linux-unwind.h (shmedia_fallback_frame_state):
Disable aliasing warning with void * cast.
(sh_fallback_frame_state): Likewise.
From-SVN: r101412
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/sh/linux-unwind.h | 10 |
2 files changed, 14 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7c733de66ff..5f4fca86a07 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2005-06-29 Kaz Kojima <kkojima@gcc.gnu.org> + * config/sh/linux-unwind.h (shmedia_fallback_frame_state): + Disable aliasing warning with void * cast. + (sh_fallback_frame_state): Likewise. + +2005-06-29 Kaz Kojima <kkojima@gcc.gnu.org> + * target.h (gcc_target): New field allocate_initial_value. * target-def.h (TARGET_ALLOCATE_INITIAL_VALUE): New macro. (TARGET_INITIALIZER): Include it. diff --git a/gcc/config/sh/linux-unwind.h b/gcc/config/sh/linux-unwind.h index fe7e2a05770..3ba943648d8 100644 --- a/gcc/config/sh/linux-unwind.h +++ b/gcc/config/sh/linux-unwind.h @@ -85,7 +85,10 @@ shmedia_fallback_frame_state (struct _Unwind_Context *context, struct siginfo info; struct ucontext uc; } *rt_ = context->cfa; - sc = (struct sigcontext *) &rt_->uc.uc_mcontext; + /* The void * cast is necessary to avoid an aliasing warning. + The aliasing warning is correct, but should not be a problem + because it does not alias anything. */ + sc = (struct sigcontext *) (void *) &rt_->uc.uc_mcontext; } else return _URC_END_OF_STACK; @@ -178,7 +181,10 @@ sh_fallback_frame_state (struct _Unwind_Context *context, struct siginfo info; struct ucontext uc; } *rt_ = context->cfa; - sc = (struct sigcontext *) &rt_->uc.uc_mcontext; + /* The void * cast is necessary to avoid an aliasing warning. + The aliasing warning is correct, but should not be a problem + because it does not alias anything. */ + sc = (struct sigcontext *) (void *) &rt_->uc.uc_mcontext; } else return _URC_END_OF_STACK; |