After I posted a buggy code and Thomas found the bug,
Peternilsson42 wrote:
> C90 doesn't support mixed declarations and statements.
A C90 compiler would not compile that code, but the bug was at runtime.
Why some people use C90 compilers yet?
> In more serious projects,
The real code is much bigger. It was a collage to reproduce the bug.
> There is no length modifier for size_t in C90. In C99 it's
> z, e.g. %zu. But %u isn't guaranteed to work in either
> language. Common practice is to cast to unsigned long.
This is useful information. You really read all that doc. Thank you.
> As Thomas mentions, this is where your bug is.
Tired programmers write bugs for idle programmers to find.
> It's good to see that you're using %p to print pointers.
> However, you should know that they won't necessarily work
> for void **. You should cast it to void *.
I think it would not compile in such compiler.
I just worry for runtime problems.
I'll be much occupied the next days, but I hope to help debug your code some
day in the future.
____________________________________________________________________________________
Moody friends. Drama queens. Your life? Nope! - their life, your story. Play
Sims Stories at Yahoo! Games.
http://sims.yahoo.com/