* config/sh/linux-unwind.h (shmedia_fallback_frame_state):
authorkkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 29 Jun 2005 01:45:37 +0000 (01:45 +0000)
committerkkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 29 Jun 2005 01:45:37 +0000 (01:45 +0000)
Disable aliasing warning with void * cast.
(sh_fallback_frame_state): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101412 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/sh/linux-unwind.h

index 7c733de..5f4fca8 100644 (file)
@@ -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.
index fe7e2a0..3ba9436 100644 (file)
@@ -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;