+2012-04-04 Eric Botcazou <ebotcazou@adacore.com>
+
+ Backport from 4.6 branch
+ * init.c (__gl_main_cpu): New global variable.
+ * par-ch3.adb: Remove a couple of blank lines.
+ * types.ads (Big_String_Ptr): Don't give it zero storage size.
+ (Source_Buffer_Ptr): Likewise.
+ * uintp.adb (Hash_Num): Use "mod" operator from Types.
+
2012-01-21 Eric Botcazou <ebotcazou@adacore.com>
PR ada/46192
/* Global values computed by the binder. */
int __gl_main_priority = -1;
+/* ??? This is needed to build the compiler with a 4.6 compiler, which is not
+ really supported but happens to essentially work except for this nit. */
+#if (__GNUC__ * 10 + __GNUC_MINOR__ > 45)
+int __gl_main_cpu = -1;
+#endif
int __gl_time_slice_val = -1;
char __gl_wc_encoding = 'n';
char __gl_locking_policy = ' ';
-- current token, and if this is the first such message issued, saves
-- the message id in Missing_Begin_Msg, for possible later replacement.
-
---------------------------------
-- Check_Restricted_Expression --
---------------------------------
Range_Node : Node_Id;
Save_Loc : Source_Ptr;
-
-- Start of processing for P_Range_Or_Subtype_Mark
begin
subtype Big_String is String (Positive);
type Big_String_Ptr is access all Big_String;
- for Big_String_Ptr'Storage_Size use 0;
- -- Virtual type for handling imported big strings
+ -- Virtual type for handling imported big strings. Note that we should
+ -- never have any allocators for this type, but we don't give a storage
+ -- size of zero, since there are legitimate deallocations going on.
function To_Big_String_Ptr is
new Unchecked_Conversion (System.Address, Big_String_Ptr);
-- Source_Buffer_Ptr, see Osint.Read_Source_File for details.
type Source_Buffer_Ptr is access all Big_Source_Buffer;
- for Source_Buffer_Ptr'Storage_Size use 0;
-- Pointer to source buffer. We use virtual origin addressing for source
-- buffers, with thin pointers. The pointer points to a virtual instance
-- of type Big_Source_Buffer, where the actual type is in fact of type
-- Source_Buffer. The address is adjusted so that the virtual origin
-- addressing works correctly. See Osint.Read_Source_Buffer for further
- -- details.
+ -- details. Again, as for Big_String_Ptr, we should never allocate using
+ -- this type, but we don't give a storage size clause of zero, since we
+ -- may end up doing deallocations of instances allocated manually.
subtype Source_Ptr is Text_Ptr;
-- Type used to represent a source location, which is a subscript of a