> the reason that the () are required
> is that * binds tighter than \s in acid.  one thing that's confusing about
> acid is main:ca is an *address* of main:ca, not its value.  so *main:ca
> is the pointer into the bss, and main:ca is the address of that pointer.

So if I understand you correctly, in acid main:ca is the equivalent to
char ** in C? And furthermore that the \s expression operates on acid
addresses rather than normal char * in C? From trying things out in
acid a little bit, it seems like this is the case, but I'm not
positive.

> the reason cp gives you garbage is it's not initialized.  in fact when
> i compile this for am64, you can see everthing quite clearly.  it is
> optimized away!  (it's a good question why a char* is treated differently
> than a char[].  perhaps there is some dark corner of the standard that
> implies things.)

I see what you're saying about cp not being initialized, but I
compiled with the -N option and I assumed that this would rectify the
situation of things being optimized away.  Interestingly enough if I
do **main:cp\c in acid it gives me 'W', but *(main:cp\s) gives me
garbage, whereas *(main:ca\s) gives me "Hello".

Thanks for the response, any other help would be appreciated!


Reply via email to