Re: [Sdcc-user] Incompatible pointers

2007-11-12 Thread Alan Carvalho de Assis
Hi Mary-Ann, 2007/11/12, Mary-Ann Johnson <[EMAIL PROTECTED]>: > > Some idea to solve it? > > How about: > > volatile rom unsigned int * taskdesc_addr = ((volatile rom unsigned int > *) (&descromarea)) + 1; > Cool! thank you very much, it works too and appear elegant. > Mary-Ann > Alan ---

Re: [Sdcc-user] Incompatible pointers

2007-11-12 Thread Alan Carvalho de Assis
Hi Peter, 2007/11/12, Peter Kuhar <[EMAIL PROTECTED]>: > On Nov 12, 2007 2:42 PM, Alan Carvalho de Assis <[EMAIL PROTECTED]> wrote: > > this type of adding int to pointer is rarely valid( depends on compiler ). > It would be better to use ++(&descromarea) or &(&descromarea)[1] if > this was you in

Re: [Sdcc-user] Incompatible pointers

2007-11-12 Thread Mary-Ann Johnson
> But it don't works: > > volatile rom unsigned int * taskdesc_addr = (volatile rom unsigned int *) ((&descromarea) + 1); > > Some idea to solve it? How about: volatile rom unsigned int * taskdesc_addr = ((volatile rom unsigned int *) (&descromarea)) + 1; Mary-Ann ---

Re: [Sdcc-user] Incompatible pointers

2007-11-12 Thread Peter Kuhar
On Nov 12, 2007 2:42 PM, Alan Carvalho de Assis <[EMAIL PROTECTED]> wrote: > Hi, > I'm compiling a simple PICos18 tasks example but I'm facing pointers problems: > > sdcc -I /usr/local/share/sdcc/include/pic16 -mpic16 -p18f4520 -o > "taskdesc.o" -c "taskdesc.c"; > at 170: error 129: pointer types i

[Sdcc-user] Incompatible pointers

2007-11-12 Thread Alan Carvalho de Assis
Hi, I'm compiling a simple PICos18 tasks example but I'm facing pointers problems: sdcc -I /usr/local/share/sdcc/include/pic16 -mpic16 -p18f4520 -o "taskdesc.o" -c "taskdesc.c"; at 170: error 129: pointer types incompatible make: *** [taskdesc.o] Error 1 This is referenced error line: volatile r