This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Preserving order of variable declarations


On Tue, Dec 22, 2009 at 11:47, Aravinda <aravindakidambi@gmail.com> 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 safest approach.


Diego.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]