Re: ecpg compile error on AIX

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org, Michael Meskes <meskes(at)postgresql(dot)org>
Subject: Re: ecpg compile error on AIX
Date: 2002-01-08 00:14:16
Message-ID: 15270.1010448856@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2002-01-08 00:41:33 Re: ecpg compile error on AIX
Previous Message Bruce Momjian 2002-01-08 00:08:54 Re: ecpg compile error on AIX