In article <1d5d51400909090843h2905057et1a60474702faf...@mail.gmail.com>,
Fernan Bolando <fernanbola...@mailc.net> wrote:
>>> gcc happily compiles a definition like
>>> #define CT_v249 =A0 =A0 =A0 ((void*)startLabel+464)
>I may not have posted the appropriate section of the code but, the app
>that I am porting have a bunch of those and I always get for all the
>section that calls those defines
>AsciiTab.hc.c:140[stdin:1124] pointer addition not fully declared: VOID

That looks right

>After googling I found this in wikipedia
>"Pointer arithmetic cannot be performed on void pointers because the
>void type has no size, and thus the pointed address can not be added
>to, although gcc and other compilers will perform byte arithmetic on
>void* as a non-standard extension. For working 'directly' with bytes
>they usually cast pointers to BYTE*, or unsigned char* if BYTE isn't
>defined in the standard library used."
>
>So I assumed that was the problem

Yes, the diagnostic and the gist of the wikipedia entry are correct:
there is nothing to scale up a void * with, so normally such an
operation has no meaning.  But it's still not clear what you're
eventually trying to do in/with the code in question, so changing
the cast to an unsigned char * cast may not necessarily be the solution
and/or best solution.
-- 
Greg Comeau / 4.3.10.1 with C++0xisms now in beta!
Comeau C/C++ ONLINE ==>     http://www.comeaucomputing.com/tryitout
World Class Compilers:  Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?

Reply via email to