Re: poniter problem

1999-03-28 Thread Glynn Clements
Amol Mohite wrote: So when gcc pads it to 8 bytes, can we say for sure that next allocation might be at 8byte boundary ? No. You can be sure that it will satisfy any CPU-imposed alignment requirements, but that's all. -- Glynn Clements [EMAIL PROTECTED]

Re: poniter problem

1999-03-27 Thread Amol Mohite
Hi! So when gcc pads it to 8 bytes, can we say for sure that next allocation might be at 8byte boundary ?

Re: poniter problem

1999-03-27 Thread Amol Mohite
Thanks I meant something like : *i = ((int *)c++); I guess this will work like doing (int *)++c. Sorry i meesd the brackets. will be more clear next time. Thank anyway.

Re: poniter problem

1999-03-26 Thread Glynn Clements
Amol Mohite wrote: say I have a char *c pointing to an array of 10 bytes. When i do (int *)c++ (increment before typecast -- forget the brackets for nw), and equate it t an int *i then *i will return 2nd to fifth bytes as integer. Is this correct ? No. `(int *)++c' or `(int *)(c+1)'

Re: poniter problem

1999-03-26 Thread James
On Fri, 26 Mar 1999, Amol Mohite wrote: # say I have a char *c pointing to an array of 10 bytes. you mean: char myarray[10], *c; c = myarray; # When i do (int *)c++ (increment before typecast -- forget the brackets for # nw), and equate it t an int *i then please re-read what you type.