Hi Patrick, thanks for the comments.
On Jan 27, 2010, at 12:24 , Patrick Ohly wrote: >> Second - I don't really see why declaring it static would mean >> anything for initialisation (apart from the fact that gcc seems not to >> be able to figure out it should complain about it then) - C-ish stuff >> is not implicitly initialized, neither in global scope nor on the >> stack. > > In global scope it is filled with zero. Only on the stack is the content > undefined. I know that most environments do that - but from a puristic C point of view: is this really something C specification demands? IMHO in Windows even all mallocs are really callocs and probably even stack vars are nulled. Some say it's good because it makes a reproducible environment, some say it's bad because it prevents missing initialisations are ever detected. Anyway, in small embedded C environments I've used, there was no auto-nulling of static vars. >> This is completely safe and we don't have to mess with the fact that >> apparently there's no proper way to initialize an empty va_list. > > Yes, that looks like a cleaner solution, with slightly higher overhead. The overhead is why I left the check in, to prevent that the change costs any time in non-debug mode. With debug enabled, it causes one function call more, but looking at all the stuff that happens inside DebugVOpenBlock I think we can afford it :-) Best Regards, Lukas Zeller (l...@synthesis.ch) - Synthesis AG, SyncML Solutions & Sustainable Software Concepts i...@synthesis.ch, http://www.synthesis.ch _______________________________________________ os-libsynthesis mailing list os-libsynthesis@synthesis.ch http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis