]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
linux-unwind.h (x86_64_fallback_frame_state): Cast to void * before struct sigcontext *.
authorRichard Henderson <rth@redhat.com>
Sat, 2 Jul 2005 02:18:13 +0000 (19:18 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Sat, 2 Jul 2005 02:18:13 +0000 (19:18 -0700)
        * config/i386/linux-unwind.h (x86_64_fallback_frame_state): Cast to
        void * before struct sigcontext *.
        (x86_fallback_frame_state): Likewise.

From-SVN: r101529

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

index d07f64e0ed6160c4a43aa3822bd250ce20b60c7e..a29ff99f76a8f8a3554b9c1b8f39f6576e837a84 100644 (file)
@@ -1,3 +1,9 @@
+2005-07-01  Richard Henderson  <rth@redhat.com>
+
+       * config/i386/linux-unwind.h (x86_64_fallback_frame_state): Cast to
+       void * before struct sigcontext *.
+       (x86_fallback_frame_state): Likewise.
+
 2005-07-01  James E. Wilson  <wilson@specifixinc.com>
 
        * doc/invoke.texi (-funit-at-a-time): Correct grammar in second bullet.
index 919c3a4bb269b720a4bf8dd4e95ff3ea8cb1506c..6ca1309c73ccc4fc25fb3fdf7dc17041dcc7a7f0 100644 (file)
@@ -52,7 +52,10 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,
       && *(unsigned long *)(pc+1) == 0x050f0000000fc0c7)
     {
       struct ucontext *uc_ = context->cfa;
-      sc = (struct sigcontext *) &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 *) &uc_->uc_mcontext;
     }
   else
     return _URC_END_OF_STACK;
@@ -138,7 +141,10 @@ x86_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;