Re: Preserving order of variable declarations

2009-12-23 Thread Diego Novillo
On Tue, Dec 22, 2009 at 11:47, Aravinda wrote: > Is this is the only way it can be done ? Or can I have > (non-temporary)variables inserted whos order can be preserved always ? Not really, the compiler will reorder variables in the stack in almost arbitrary ways. Wrapping them in structs is the

Preserving order of variable declarations

2009-12-22 Thread Aravinda
Hi, I want to for every pointer in a program append another pointer associated with it. Eg. If the program has, char *p; I want this to be transformed into, char *pa; char *p such that, (&p)-4 is same as &(pa). I am only aware I can insert temporary variables in the gcc gimple pass. But the or