Re: [CIL users] static const

2012-07-23 Thread Gabriel Kerneis
On Mon, Jul 23, 2012 at 05:45:06PM +0200, Jan Smets wrote: > Is this a valid coding error or a bug in cil ? > static const unsigned short b = a - 1; This is a coding error (or at least gcc refuses to compile it). Not sure about the integer promotion, though. -- Gabriel ---

[CIL users] static const

2012-07-23 Thread Jan Smets
Hi Is this a valid coding error or a bug in cil ? The statics are declared at function scope. Thanks. func x { static const unsigned short a = 22; static const unsigned short b = a - 1; ... } error: initializer element is not constant CIL code: static unsigned short const a =22