On Friday 23 January 2004 19:59, Dave Serls wrote: > > > This looks like a re-visit of a similar problem with bbweather. > > > Are pointers in new instantiation not set to NULL automagically by > > > gcc3xxx? > > > > A new pointer has an unknown value. NULL (which is now 0 in common C++ > > usage) means "I point to nothing". > > Yes. As it was in C. > Yet with gcc 3.3.1 (Mandrake 9.2rc2), the unknown value is 0x100, hardly > NULL. I'm assuming gcc 2.96 has it 0 (NULL). > Also, I'm assuming that the failing call to XFreeFont() tolerates NULL, > but not 0x100. >
It is 100% valid for a compiler to not initialize a new variable. So it will end up with whatever used to be there. It is absolutely, positively a bug if any code uses a variable before some value is assigned to it. Yes, as you surmise, XFreeFont() does tolerate NULL. In fact all Xlib calls that free something tolerate empty objects. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] List archives: http://asgardsrealm.net/lurker/splash/index.html Trouble? Contact [EMAIL PROTECTED]
