Skip site navigation (1) Skip section navigation (2)

Re: fix for strict-alias warnings

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Andrew Dunstan" <andrew(at)dunslane(dot)net>
Cc: "PG Patches" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: fix for strict-alias warnings
Date: 2003-10-14 14:00:07
Message-ID: 8811.1066140007@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
"Andrew Dunstan" <andrew(at)dunslane(dot)net> writes:
> Of course, the linux kernel is aimed at a limited set of compilers - as I
> understand it basically gcc although it has been made to build with Intel
> compilers - which makes things somewhat easier for them. What is our target
> set of compilers? What is our target version of C?

"Pretty much anything that speaks ANSI C" is my usual feeling about
that.  As yet we have not heard of any non-gcc compilers in which this
is a problem, although you have a point that some compiler somewhere may
do this and not have a way to turn it off :-(

> Also note that uninhibited casting between types can still cause alignment
> problems,

We understand that issue, we solved it years ago.

BTW, I haven't looked at the problem spots in detail.  How many of them
are due to the use of MemSet in conjunction with other access to a chunk
of memory?  ISTM that we need not worry about code motion around a
MemSet call, since that would require the compiler to prove that the
memset() path through the macro wouldn't be affected, which I doubt it
would think.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2003-10-14 14:31:02
Subject: Re: fix for strict-alias warnings
Previous:From: Andrew SullivanDate: 2003-10-14 13:56:49
Subject: Re: Heading to final release

pgsql-patches by date

Next:From: Andrew DunstanDate: 2003-10-14 14:31:02
Subject: Re: fix for strict-alias warnings
Previous:From: Andrew DunstanDate: 2003-10-14 11:37:05
Subject: Re: fix for strict-alias warnings

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group