Quantcast
Channel: lkml.org : Shesha Sreenivasamurthy
Viewing all articles
Browse latest Browse all 1267

Re: [PATCH v4 1/2] kernel.h: Introduce const_max() for VLA removal

$
0
0
Linus Torvalds writes: (Summary) How does that look?
Ok, that alleviates my worry about one class of insane behavior, but it does raise a few other questions:
it does raise a few other questions:
- what drugs is gcc on where (typeof(x)(x)) makes a difference? - this does have the usual "what happen if you do - this does have the usual "what happen if you do const_max(-1,sizeof(x))
const_max(-1,sizeof(x))
where the comparison will now be done in 'size_t', and -1 ends up being a very very big unsigned integer.
being a very very big unsigned integer.
Is there no way to get that type checking inserted?

Viewing all articles
Browse latest Browse all 1267

Trending Articles