Re: ecpg compile error on AIX - Mailing list pgsql-hackers

From Tom Lane
Subject Re: ecpg compile error on AIX
Date
Msg-id 15270.1010448856@sss.pgh.pa.us
Whole thread Raw
In response to ecpg compile error on AIX  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Responses Re: ecpg compile error on AIX  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
>> Btw., I've never seen any problems related to -Wcast-align?  Is the TODO
>> item obsolete or is it platform-related?

Youse guys that run on Intel hardware will never see any problems from
it, except possibly a lost cycle here or there due to unaligned fetches.

But a lot of non-Intel hardware (particularly RISC architectures) treats
an unaligned access as a segfault.

Right at the moment we can't usefully enable -Wcast-align because it
generates an unreasonable number of complaints.  Someday I'm going to
try to clean those all up.  My personal todo list has:

Reduce, or eliminate entirely, warnings issued by -Wcast-align.  gcc will
warn about char* to foo* but not about void* to foo*, so the bulk of the
warnings might be controllable by using void* in places where we now use
char*.  Be careful not to introduce arithmetic on void* pointers though;
use -Wpointer-arith to catch those.  Ideally we should add both of these
(and maybe some other non-Wall flags) to standard gcc arguments.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: RC1 time?
Next
From: Bruce Momjian
Date:
Subject: Re: ecpg compile error on AIX