On Tue, Jun 12, 2012 at 12:50:47PM +0200, Marco Trudel wrote:
> Meaning that locals always get fully initialized but globals not 
> anymore. Was this intended?

Yes because global variables are initialized by default to zero according to
C99, contrary to local variables.  So this code:

> int foo_glob[5] = {1};

still produces a correctly initialized global array.  Local variables, on the
other hand, need to be initialized explicitely and completely in the case of
CIL since initializers are discarded and replaced by assignments.

I believe the current situation is correct but if I'm wrong, or if someone
used to rely on explicit initialization of global arrays (which did not work
beyond 16 cells anyway), please say so.

Best regards,
-- 
Gabriel

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
CIL-users mailing list
CIL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cil-users

Reply via email to