Dave, To us the unaligned pointer assignment is obvious when we look at it in context. To the compiler, that line alone is not enough to say that assignment is invalid. For example, it is a perfectly valid if the value of "i" is a multiple of four in your example. Sometimes pointers are used to pass information which are not valid pointers (but as an escape to the norm) and these pople would be crossed if compilers did not allow them to do this. Jaya --- In lpc2000@yahoogroups.com, "dsidlauskas1" <dsidlauskas@...> wrote: > The information to the compiler is in the line: > > ip = (int *)&buf[i]; > > Where it should be clear that the pointer is to an unaligned int. > > Dave S.
Message
Re: For C Experts
2006-03-30 by jayasooriah
Attachments
- No local attachments were found for this message.