A Linux kernel header file contains code like the example below, which
causes CIL to bomb with a complaint about non-constant array size.
John Regehr
int foo (int bit)
{
if (__builtin_constant_p(bit)) {
return sizeof (char[bit]);
} else {
return 0
> On a big tangent, has anyone ever been tempted to recast Cil's
> analyses and optimizations in a composable framework, a la [1]?
We did a bit of work in this direction:
http://www.cs.utah.edu/~regehr/papers/lctes06_1/
http://www.cs.utah.edu/~coop/research/cxprop/
>unsigned long a;
>unsigned long *p;
>p = (unsigned long *)&p;
>a = ++(*p);
Gabriel, since p refers to itself this code looks to me like an
occurrence of the second clause of this type of undefined behavior:
"Between two sequence points, an object is modified more than once, or
aned it up.
John Regehr
Mauro Baluda wrote:
> in the cil documentation I read about a function inliner which I can't
> find in the code...
> http://hal.cs.berkeley.edu/cil/ext.html#toc14
>
> Is it still available? or any