In article <df49a7370909090849wc1729bk469b15da35ec3...@mail.gmail.com>,
roger peppe <rogpe...@gmail.com> wrote:
>2009/9/9 erik quanstrom <quans...@quanstro.net>:
>>> gcc happily compiles a definition like
>>> #define CT_v249 =C2=A0 =C2=A0 =C2=A0 ((void*)startLabel+464)
>>
>> no it doesn't.
>
>yes it does:
>
>% cat > x.c
>void *f(void *v){return v + 23;}
>% gcc -Wall -c x.c
>%

use -pedantic:
q.c:1: warning: pointer of type 'void *' used in arithmetic

There is probably some option to have the warning as an error too.
-- 
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