Re: [Spice-devel] [PATCH 3/3] make allocation fixed instead of variable

2016-03-02 Thread Frediano Ziglio
> > On Tue, Feb 23, 2016 at 01:57:59PM -0600, Jonathon Jongsma wrote: > > > > I'm a bit ambivalent about this change. Although it may generate better > > code, I > > think that it makes the code slightly more difficult to read. I'd almost > > prefer > > a #define to the enum solution. But I guess

Re: [Spice-devel] [PATCH 3/3] make allocation fixed instead of variable

2016-03-02 Thread Christophe Fergeau
On Tue, Feb 23, 2016 at 01:57:59PM -0600, Jonathon Jongsma wrote: > > I'm a bit ambivalent about this change. Although it may generate better code, > I > think that it makes the code slightly more difficult to read. I'd almost > prefer > a #define to the enum solution. But I guess I don't care t

Re: [Spice-devel] [PATCH 3/3] make allocation fixed instead of variable

2016-02-23 Thread Jonathon Jongsma
I'm a bit ambivalent about this change. Although it may generate better code, I think that it makes the code slightly more difficult to read. I'd almost prefer a #define to the enum solution. But I guess I don't care too much. On Tue, 2016-02-23 at 16:06 +, Frediano Ziglio wrote: > Due to th

[Spice-devel] [PATCH 3/3] make allocation fixed instead of variable

2016-02-23 Thread Frediano Ziglio
Due to the way C handle constant variable the usage of these constant were used as variable making compiler generate something like alloca call while could compute allocation size statically. Fix this using enum. You can see the difference in the generated object file. Signed-off-by: Frediano Zigl