CC'ing new maintainer.
On Thu, Sep 07, 2006 at 06:44:36PM +0200, Martin Michlmayr wrote:
> * Martin Michlmayr <[EMAIL PROTECTED]> [2006-09-06 13:34]:
> > > gcc -c sysutil.c -g -O2 -Wall -W -Wshadow -idirafter dummyinc
> > > sysutil.c: In function 'vsf_sysutil_wait_exited_normally':
>
> > {
> > - return WIFEXITED(p_waitret->exit_status);
> > + return WIFEXITED((struct vsf_sysutil_wait_retval
> > *)p_waitret->exit_status);
> > }
>
> Dan, maybe you have some time to look at this issue more deeply.
> Here's a smal testcase:
>
> struct rx_length_info
> {
> unsigned short tag;
> };
> void f(void)
> {
> const struct rx_length_info *length_info;
> __typeof__ (*(&length_info->tag)) __v = *(&length_info->tag);
> }
>
> pinskia pointed out that it works with the following change:
>
> - __typeof__ (*(&length_info->tag)) __v;
> - __v = *(&length_info->tag);
> + __typeof__ (*(&length_info->tag)) __v = *(&length_info->tag);
>
> /usr/include/stdlib.h defines:
>
> # define
> __WAIT_INT(status)
> (__extension__ ({ union { __typeof(status) __in; int __i; } __u; \
> __u.__in = (status); __u.__i; }))
>
> Is there some way this could be rewritten so applications don't need
> to cast the const away?
I don't know. You might be able to use a union initializer in the same
way.
--
Daniel Jacobowitz
CodeSourcery
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]