From: | "Jeroen T(dot) Vermeulen" <jtv(at)xs4all(dot)nl> |
---|---|
To: | Dann Corbit <DCorbit(at)connx(dot)com> |
Cc: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: 7.5 beta version |
Date: | 2004-04-12 19:24:41 |
Message-ID: | 20040412192440.GT3127@xs4all.nl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Apr 12, 2004 at 11:55:45AM -0700, Dann Corbit wrote:
> 1.
> The C language does not define alignment of structs.
Platform ABI standards do, though (hence the "as long as it adheres to..."
clause in my previous post). Whether it's in the C language or in the
platform's ABI standards is important when writing portable code; it should
not matter when compiling an existing product--provided that the platform
defines the ABI unambiguously. The latter is what's in question here.
> The C language does not specify that an integer shall be the same size
> on two different platforms.
That is not a problem when linking across compilers, only when linking
across ABIs. I would expect that doing so would fail at link time.
Besides, as a practical matter, even the 64-bit platforms current today
normally specify that int is a 32-bit type so this should not come into
play in this case, even when linking e.g. Itanium code to x86 code.
> The C language does not specify that IEEE arithmetic must be used or
> even that a double shall be able to represent a value larger than a
> float.
Again, I doubt this is relevant in this case where the problem is linking
across compilers on the same platform, not across platforms.
> Mingw GCC is both a C and a C++ compiler. Fortunately, the C compiler
> is used, because there is no way that the code base would compile as C
> code. A trivial example to show why not is the frequent use of the C++
> keyword 'new' in the code base. Here is an example:
With gcc at least, the matter is even simpler than that. It selects an
appropriate front-end (C, C++, ...) based on the names of the source files
being compiled. This may break down at link time however; g++ links to
the C++ standard library, which gcc by default doesn't.
Jeroen
From | Date | Subject | |
---|---|---|---|
Next Message | Jürgen Cappel | 2004-04-12 19:33:27 | Re: 7.5 beta version] |
Previous Message | Tom Lane | 2004-04-12 19:17:58 | Re: PostgreSQL configuration |