learning dragonfly or C...

Gunther Nikl gni at gecko.de
Mon Nov 15 06:41:00 PST 2004


Matthew Dillon <dillon at xxxxxxxxxxxxxxxxxxxx> wrote:
> :>      struct fubar *blah;
> :>      struct fubar *nblah;
> :>
> :>      getmafubar(&nblah);
> :>      blah = nblah;
> :>
> :>      blech = blah->this + blah->that - somefunction(blah);
> :>      and_other_random_things_using(blah);
> :>
> :>      blah blah blah...
> :>
> :If it's not to protect *blah memory from illegal getmafubar() data,
> :then my next guess is a debugging trap, so if getmafubar() fails, &blah
> :will retain state data from before the error? (not so subtle hint at
> :checkpt.c line 487)
> :
> :// George
> :
> 
>    Nope.  Ok, I'll tell you... it's so the compiler can optimize 'blah'
>    into a register.

  I thought You would fear that vp might get clobbered.

  Gunther





More information about the Kernel mailing list