This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/51555] New: Thinks System.Address is 64 bits wide when compiling with -m32
- From: "baldrick at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 14 Dec 2011 20:11:02 +0000
- Subject: [Bug ada/51555] New: Thinks System.Address is 64 bits wide when compiling with -m32
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51555
Bug #: 51555
Summary: Thinks System.Address is 64 bits wide when compiling
with -m32
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: baldrick@gcc.gnu.org
When using -m32 on a 64 bit system, the compiler thinks that System.Address
does
not have the same size as a pointer. Compiling the following testcase gives:
$ gcc -S m32.adb -m32
m32.adb:4:07: warning: types for unchecked conversion have different sizes
with System;
package M32 is
type P is access Integer;
function C (A : System.Address) return P;
end;
with Ada.Unchecked_Conversion;
package body M32 is
function C (A : System.Address) return P is
function D is new Ada.Unchecked_Conversion (System.Address, P);
begin
return D (A);
end;
end;