Hi, MSVC implements proper initialization of static variables.
http://msdn.microsoft.com/en-us/library/0x80hh2d%28v=VS.90%29.aspx "If you do not explicitly initialize a global static variable, it is initialized to 0 by default, and every member that has pointer type is assigned a null pointer. " Olaf > On Monday, January 24, 2011 07:54:53 am Geoff McLane wrote: >> On Sun, 2011-01-23 at 16:50 +0100, ThorstenB wrote: >>> On Sun, Jan 23, 2011 at 3:44 PM, Geoff McLane wrote: >>> And I am not so sure MSVC even zeros static variables, >>> unless specifically set to NULL/0, unlike as suggested >>> for gcc, thus say :- >>> >>> static char * cp; >>> void func() { >>> >>> if (cp == NULL) >>> >>> cp = malloc(val); >>> >>> can also be a problem... >>> > ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ Flightgear-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/flightgear-devel

