Theo Schlossnagle wrote:



And note that a compiler is at liberty to optimize checks against
uninitialized variables such that the code path followed is *not*
possible for any of the possible values for the variable had it been
properly initalized.  I.e., undefined behaviour can be exactly that.
Yeah, I realize that -- I'm pretty familiar with compiler principles. We try to be pretty careful about that. valgrind on Linux helps a lot as it can report on any arguments, stack variables, heap variable, etc. that ever are used without initialization.

Give Studio 10 lint a try, it is a very handy if often overlooked tool for this kind of analysis.

Ian

_______________________________________________
opensolaris-discuss mailing list
[email protected]

Reply via email to