diff mbox

[Ada] Fix PR ada/49084

Message ID 201112131219.41873.ebotcazou@adacore.com
State New
Headers show

Commit Message

Eric Botcazou Dec. 13, 2011, 11:19 a.m. UTC
That's the mysterious bootstrap failure on MinGW32.  Cesar did all the hard 
debugging, found out that the problem comes from the ABI change for bitfields 
and proposed the attached fix (with an additional tweak of mine).

Tested by Cesar on x86/Windows and by me on x86/Linux, applied on the mainline.


2011-12-13  Cesar Strauss  <cestrauss@gmail.com>
            Eric Botcazou  <ebotcazou@adacore.com>

	PR ada/49084
	* types.h (Byte): Change typedef to 'unsigned char'.
	* atree.h (struct Flag_Word): Use Byte for 'convention' field.
diff mbox

Patch

Index: types.h
===================================================================
--- types.h	(revision 182203)
+++ types.h	(working copy)
@@ -6,7 +6,7 @@ 
  *                                                                          *
  *                              C Header File                               *
  *                                                                          *
- *          Copyright (C) 1992-2010, Free Software Foundation, Inc.         *
+ *          Copyright (C) 1992-2011, Free Software Foundation, Inc.         *
  *                                                                          *
  * GNAT is free software;  you can  redistribute it  and/or modify it under *
  * terms of the  GNU General Public License as published  by the Free Soft- *
@@ -41,24 +41,24 @@  typedef unsigned char Boolean;
 
 /* General Use Integer Types */
 
-/* Signed 32/bit integer */
+/* Signed 32-bit integer */
 typedef int Int;
 
-/* Signed 16 bit integer */
+/* Signed 16-bit integer */
 typedef short Short;
 
-/* Non/negative Int values */
+/* Non-negative Int values */
 typedef Int Nat;
 
 /* Positive Int values */
 typedef Int Pos;
 
-/* 8/bit unsigned integer */
-typedef char Byte;
+/* 8-bit unsigned integer */
+typedef unsigned char Byte;
 
-/* 8/Bit Character and String Types:  */
+/* 8-Bit Character and String Types:  */
 
-/* 8/bit character type */
+/* 8-bit character type */
 typedef char Char;
 
 /* Graphic characters, as defined in ARM */
Index: atree.h
===================================================================
--- atree.h	(revision 182203)
+++ atree.h	(working copy)
@@ -139,7 +139,7 @@  struct Flag_Word
   Boolean      flag94	    :  1;
   Boolean      flag95	    :  1;
   Boolean      flag96	    :  1;
-  Short        convention   :  8;
+  Byte         convention   :  8;
 };
 
 /* Structure used for extra flags in fourth component overlaying Field12 */