Skip to content

Commit 8fb619a

Browse files
author
rth
committed
* config/i386/linux-unwind.h (x86_64_fallback_frame_state): Cast to
void * before struct sigcontext *. (x86_fallback_frame_state): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101529 138bc75d-0d04-0410-961f-82ee72b054a4
1 parent 0cadf29 commit 8fb619a

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

gcc/ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2005-07-01 Richard Henderson <[email protected]>
2+
3+
* config/i386/linux-unwind.h (x86_64_fallback_frame_state): Cast to
4+
void * before struct sigcontext *.
5+
(x86_fallback_frame_state): Likewise.
6+
17
2005-07-01 James E. Wilson <[email protected]>
28

39
* doc/invoke.texi (-funit-at-a-time): Correct grammar in second bullet.

gcc/config/i386/linux-unwind.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,
5252
&& *(unsigned long *)(pc+1) == 0x050f0000000fc0c7)
5353
{
5454
struct ucontext *uc_ = context->cfa;
55-
sc = (struct sigcontext *) &uc_->uc_mcontext;
55+
/* The void * cast is necessary to avoid an aliasing warning.
56+
The aliasing warning is correct, but should not be a problem
57+
because it does not alias anything. */
58+
sc = (struct sigcontext *) (void *) &uc_->uc_mcontext;
5659
}
5760
else
5861
return _URC_END_OF_STACK;
@@ -138,7 +141,10 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
138141
struct siginfo info;
139142
struct ucontext uc;
140143
} *rt_ = context->cfa;
141-
sc = (struct sigcontext *) &rt_->uc.uc_mcontext;
144+
/* The void * cast is necessary to avoid an aliasing warning.
145+
The aliasing warning is correct, but should not be a problem
146+
because it does not alias anything. */
147+
sc = (struct sigcontext *) (void *) &rt_->uc.uc_mcontext;
142148
}
143149
else
144150
return _URC_END_OF_STACK;

0 commit comments

Comments
 (0)