Re: ecpg compile error on AIX
От | Tom Lane |
---|---|
Тема | Re: ecpg compile error on AIX |
Дата | |
Msg-id | 14463.1010437660@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | ecpg compile error on AIX (Tatsuo Ishii <t-ishii@sra.co.jp>) |
Ответы |
Re: ecpg compile error on AIX
Re: ecpg compile error on AIX |
Список | pgsql-hackers |
Tatsuo Ishii <t-ishii@sra.co.jp> writes: > I got followings with current on AIX 5L using xlc (native AIX > compiler): > "data.c", line 357.81: 1506-068 (S) Operation between types "void*" and "long" is not allowed. > "data.c", line 362.90: 1506-068 (S) Operation between types "void*" and "long" is not allowed. With HP's compiler I get lots of cc: "data.c", line 57: error 1539: Cannot do arithmetic with pointers to objects of unknown size. which is perhaps more to the point. The GCC manual explains why Michael was able to get away with this (I assume he used gcc): In GNU C, addition and subtraction operations are supported on pointers to `void' and on pointers to functions. Thisis done by treating the size of a `void' or of a function as 1. A consequence of this is that `sizeof' is also allowed on `void' and on function types, and returns 1. The option `-Wpointer-arith' requests a warning if these extensions are used. It occurs to me that we ought to add -Wpointer-arith to our standard gcc options, so that this sort of mistake will be caught sooner in future. I consider this compile failure a "must fix" before we can go to RC1 ... regards, tom lane
В списке pgsql-hackers по дате отправления: