Re: [CIL users] __builtin_offsetof

2012-05-17 Thread Smets, Jan (Jan)
More input: #include typedef struct bla { int a; int something; int c; } tBla; int main() { int local; int blub[__builtin_offsetof(tBla, something) + sizeof(local)]; printf("%d\n", sizeof(blub)); return 0; } Run cil with --doheapify --heapifyAll --dosfi --noInsertImpli

Re: [CIL users] Error: CIL_MACHINE machine model is invalid: alignof_enum not specified

2012-05-17 Thread Gabriel Kerneis
On Tue, May 15, 2012 at 03:02:59PM -0400, Lipeng Wan wrote: > The CIL_MACHINE variable I put into ~/.bashrc is: > CIL_MACHINE="bool=1,1 short=2,1 int=2,1 long=4,1 long_long=8,1 float=4,1 > double=4,1 long_double=4,1 void=1 pointer=2,1 enum=2,1 fun=1,1 > alignof_string=1 max_alignment=1 size_t=unsig

Re: [CIL users] returning result of void function

2012-05-17 Thread Gabriel Kerneis
On Wed, May 16, 2012 at 05:15:18PM +0200, Smets, Jan (Jan) wrote: > test.c:8: Error: Return statement with a value in function returning void > Error in doStatement (Errormsg.Error) > Error: Cabs2cil had some errors > > I think CIL should not warn in this example. I understand why gcc accepts it