Re: Casting away noderef and address spaces?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 22, 2008 at 01:23:47PM -0800, Christopher Li wrote:
> On Mon, Dec 22, 2008 at 12:57 PM, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
> > The right solution is
> >        (*(typeof(v) __attribute__((address_space(0), force)) *)(&v))
> >
> > Cast there will take a pointer to type of V and force-cast it to pointer to
> > unqualified type of V.  *(cast)&v will do the obvious thing.  Will trim
> > both the AS and noderef.
> 
> Thanks, that is much better. However sparse don't know how to handle it yet.
> 
> /tmp/typeof.c:11:64: warning: incorrect type in assignment (invalid types)
> /tmp/typeof.c:11:64:    expected unknown type 11 <noident>
> /tmp/typeof.c:11:64:    got int
> 
> classify_type does not know how to handle SYM_TYPEOF yet.
> Let me see if I can make it to work.

Works here (built from 8f208e215a531d2b32aec0428fd5eaa24ae3100b)...

But yes, SYM_TYPEOF is a brittle mess, so whether that works or not
is, er, version-dependent ;-/

I really ought to resurrect lazy-type-expressions branch...
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux