The compiler is the one which comes with CW6.
On the pointer front:
I dont expect the compiler to change the pointer but take this example
(psudo addresses):
I receive 3 bytes of serial data and place them at address 0x100
if my data is infact:
struct {
char a;
word b;
} mystruct;
And I have a pointer to mystruct overlayed on my serial data
mystruct *ptr = 0x100;
and do : word c = *mystruct->b then you get a bus error as the
compiler does a move.w over a odd boundary.
What it should do is 2 * move.b and recombine the result transparently to
the C user. Other 68K compiler I have used do this.
> -----Original Message-----
> From: Roger Chaplin [SMTP:[EMAIL PROTECTED]]
> Sent: 28 July 2000 15:37
> To: Palm Developer Forum
> Subject: Re: Compiler - Cannot convert signed char * to char *
>
> Richard Anderson <[EMAIL PROTECTED]> wrote:
>
> > Anyone know why sometimes the compiler gives the error
>
> *Which* compiler?
>
> > PS - The compiler also does not handle even word alligment correctly -
> ie if
> > you point a UInt 16 * at an odd address and read it you get a bus error.
> Im
> > sure that the complier should handle this !!!
>
> I'm sure that it should not. When I create a pointer to something, then
> dereference that pointer, the compiler had better not change the value
> of the pointer behind my back!
>
> Pointers in C are like a high-powered rifle: very useful in the hands
> of a skilled marksman, but not too smart about what they're pointed at.
>
> --
> Roger Chaplin
> <[EMAIL PROTECTED]>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/