This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/12782] New: ffi.h #defines ffi_type_[us]long wrong on 32bit arches
- From: "a dot rottmann at gmx dot at" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Oct 2003 00:43:19 -0000
- Subject: [Bug other/12782] New: ffi.h #defines ffi_type_[us]long wrong on 32bit arches
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12782
Summary: ffi.h #defines ffi_type_[us]long wrong on 32bit arches
Product: gcc
Version: 3.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: other
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: a dot rottmann at gmx dot at
CC: gcc-bugs at gcc dot gnu dot org
The way ffi.h #defines the ffi_type_XX equivalents to the standard C
types seems bad - they are mixed along with the #defines of the
fixed-bit types (e.g. UINT32), but the two issues are orthogonal.
This results in ffi_type_ulong, for instance, being #defined to ffi_type_uint64
on (at least) x86, as the following test program indicates:
#include <stdio.h>
#include <ffi.h>
int main ()
{
printf ("&ffi_type_ulong: %p &ffi_type_uint64: %p\n",
&ffi_type_ulong, &ffi_type_uint64);
}
This results in the following output on my Athlon (no, no Athlon64 yet ;-))
&ffi_type_ulong: 0x8049738 &ffi_type_uint64: 0x8049738