Re: [RFC v0 0/4] Give a type to constants too

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

 



On Thu, Mar 16, 2017 at 10:25:08AM -0700, Linus Torvalds wrote:
> Sorry for not reacting to this earlier..

No problem, of course, but since you're looking over here, hehe,s
I wonder if you would have an opinion on:
   http://marc.info/?l=linux-sparse&m=148728997923939&w=4
and to a lesser degree:
   http://marc.info/?l=linux-sparse&m=148906980631077&w=4
I would appreciate it very much.

> On Sat, Mar 11, 2017 at 7:47 AM, Luc Van Oostenryck
> <luc.vanoostenryck@xxxxxxxxx> wrote:
> > This is a RFC for giving a type to constants/PSEUDO_VALs.
> 
> This seems completely broken. Not from an implementation standpoint,
> but from a conceptual one.

Yes, I agree completely. I realized once I tried to make use of it.

> To explain, let me give a completely idiotic example:

...

> Linearization has fundamentally gotten rid of all the C types, and all
> you can find are some rough remnants of them (you can find the *size*
> of the type, and you can find the rough "type" of type - is it a
> pointer, FP value or integer. There aren't even any signs, although
> some _operations_ are signed (but not the pseudos).
> 
> The same pseudo can have many different types.
> 
>                     Linus

There is just one problem, like Dibyendu noticed, it is when you use
a constant in the variable part of a variadic function. In this case
you don't have any type/size information from the function and
nothing from the pseudo either.

I don't see how this could be done without requiring that pseudos
(which indded have indeed no type) have a fixed size that must not
be changed by CSE or the simplifications.


-- Luc
--
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