pthreads in guid.c break compile
Derek Atkins
warlord at MIT.EDU
Thu Jul 10 20:55:12 CDT 2003
linas at linas.org (Linas Vepstas) writes:
> > This is equivalent of the following (broken) code:
>
> Actually, the example you give is valid C, although I don't have my
> handy-dandy standards specification handy enough to quote paragraph and
> section. Entering/exiting a block does not grow or shrink the stack,
> and block-local variables are not put in a portion of the stack that is
> shared with other blocks, and so wouldn't be clobbered. Hmmm.
> Now I wonder if the spec actually does deal with this ...
By broken I didn't mean that the C wasn't valid, but that pointers
would become invalid. However, you are right, now that you mention
it. All local variable storage space is stored on the stack at the
top of the function... So yea, your code should work (even if it's
ugly ;)
Sorry.. It's been a long day.
> --linas
-derek
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord at MIT.EDU PGP key available
More information about the gnucash-devel
mailing list