[Gllug] Pointer arithmetic with void *

Tethys tet at accucard.com
Wed Aug 14 15:35:57 UTC 2002


>If gcc is allowing this, it is breaking the standard. Try compiling with
>the -pedantic flag.

Using -pedantic is usually over the top even for a self confessed pedant
like me. However even with -Wall -ansi -pedantic, gcc still only gives a
warning, not an error. Still, it does at least notice it, which -Wall
-ansi (my default warning level) doesn't.

>If you want to do this sort of thing, you should cast via char*:

Yes, that's what I've been doing up until now. I just wondered if it
was strictly necessary.

Tet

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list