| From: Rico <[EMAIL PROTECTED]>

| My guess is that -O2 is good enough but sz has not been initialized so
| the compiler doesn't generate debug info for it and gdb doesn't get to
| see it. I may be wrong.

I don't think that that is the case.  The crash happened in a use of
sz, so it must have been set.

My guess that -O2 could be the problem is based on the fact that once
an optimizer has had at a program, there is often no unique consistent
place (machine register or storage location) to look for the value of
a variable so that a debugger might not know how or where to find the
value.  PhD theses have been written about how to co-ordinate
debuggers with optimizers.  But this remains a guess -- I've never
tried gdb on a c++ program before.

The explanation might be simpler, like something to do with name
mangling.

I could spend a bunch of time experimenting to figure this out, but it
doesn't matter much to me and furthermore someone else surely already
knows.

| I vaguely recall coming across some mention of a difference between NULL
| and NUL; thanks to your email I think I have finally managed to get a
| grip on the answer. 

NULL is the C/C++ name for a null pointer constant.  There is a lot of
technical crap around this, but the bottom line is that you should
think of NULL as a pointer value.  (I could go into the technicalities
for C, but you really don't want to know.)

NUL is the name of the character in ASCII/ISO-646/ISO-8859/UNICODE/...
encoded as 0 and used by C as the string terminator.  In C, it is best
written as '\0'.  See the ASCII(7) manpage in most UNIX-like systems.

So when I use them NULL and NUL are very different beasts.

Thanks,

Hugh Redelmeier
[EMAIL PROTECTED]



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
LICQ-Main mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/licq-main

Reply via email to