From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28484 invoked by alias); 30 Mar 2005 09:12:37 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 28059 invoked by uid 48); 30 Mar 2005 09:12:12 -0000 Date: Wed, 30 Mar 2005 09:12:00 -0000 Message-ID: <20050330091212.28056.qmail@sourceware.org> From: "charlet at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040417201417.14997.ehicks@binarymagi.com> References: <20040417201417.14997.ehicks@binarymagi.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug ada/14997] ncurses build fails with Ada X-Bugzilla-Reason: CC X-SW-Source: 2005-03/txt/msg03422.txt.bz2 List-Id: ------- Additional Comments From charlet at gcc dot gnu dot org 2005-03-30 09:12 ------- Here is a further simplification of the test case: procedure PQ is subtype C_ULong is Interfaces.C.unsigned_long; type C_Chtype is new C_ULong; type Character_Attribute_Set is array (0 .. 47) of Boolean; pragma Pack (Character_Attribute_Set); type Attributed_Character is record Attr : Character_Attribute_Set; Color : Character; Ch : Character; end record; pragma Convention (C, Attributed_Character); -- This is the counterpart for the chtype in C. for Attributed_Character use record Attr at 0 range 0 .. 47; Color at 0 range 48 .. 55; Ch at 0 range 56 .. 63; end record; for Attributed_Character'Size use 64; function Chtype_To_AttrChar is new Ada.Unchecked_Conversion (C_Chtype, Attributed_Character); X : constant C_Chtype := 0; Y : Character_Attribute_Set; begin Y := Chtype_To_AttrChar (X).Attr; end PQ; The expected output of the compilation is: gcc -c pq.adb pq.adb:27:04: warning: types for unchecked conversion have different sizes I assume the incorrect code in the ncurses Ada binding has been fixed in the mean time. Anyway, GNAT should not ICE here. Arno -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14997