Commit baa571ab by Arnaud Charlet

[multiple changes]

2014-07-18  Robert Dewar  <dewar@adacore.com>

	* sem_ch13.adb (Build_Discrete_Static_Predicate): New name
	for Build_Static_Predicate (Build_Predicate_Functions):
	Don't try to build discrete predicate for real type.
	(Build_Predicate_Functions): Report attempt to use
	Static_Predicate function on real type as unimplemented.
	* sem_util.adb (Check_Expression_Against_Static_Predicate):
	Add guard to prevent blow up on predicate for real type.

2014-07-18  Ed Schonberg  <schonberg@adacore.com>

	* einfo.adb (Set_Static_Predicate): Simplify assertion to handle
	properly static predicate on enumeration types and modular types
	(not subtypes).

2014-07-18  Pierre-Marie Derodat  <derodat@adacore.com>

	* scos.ads (SCO_Unit_Table_Entry): Add a field to keep track of
	the corresponding source file index.
	* get_scos.ads (Get_SCOs): Add a default value for it.
	* par_sco.adb (SCO_Record): Fill the corresponding value.
	* scos.h: New.

2014-07-18  Vincent Celier  <celier@adacore.com>

	* a-strunb-shared.adb, s-auxdec.ads, s-rannum.adb, atree.ads,
	urealp.adb, vms_data.ads, lib.ads, s-auxdec-vms_64.ads: Minor
	reformatting.
	* gnat_ugn.texi: Add documentation for new gnatmem switch -t.

2014-07-18  Thomas Quinot  <quinot@adacore.com>

	* g-sercom.ads (Set): document possible data loss.

2014-07-18  Ed Schonberg  <schonberg@adacore.com>

	* exp_attr.adb (Expand_N_Attribute_Reference, cases Input,
	Output, Read, Write): If the restriction No_Streams is active,
	replace each occurrence of a stream attribute by an explicit
	Raise statement.

From-SVN: r212782
parent fc999c5d
2014-07-18 Robert Dewar <dewar@adacore.com> 2014-07-18 Robert Dewar <dewar@adacore.com>
* sem_ch13.adb (Build_Discrete_Static_Predicate): New name
for Build_Static_Predicate (Build_Predicate_Functions):
Don't try to build discrete predicate for real type.
(Build_Predicate_Functions): Report attempt to use
Static_Predicate function on real type as unimplemented.
* sem_util.adb (Check_Expression_Against_Static_Predicate):
Add guard to prevent blow up on predicate for real type.
2014-07-18 Ed Schonberg <schonberg@adacore.com>
* einfo.adb (Set_Static_Predicate): Simplify assertion to handle
properly static predicate on enumeration types and modular types
(not subtypes).
2014-07-18 Pierre-Marie Derodat <derodat@adacore.com>
* scos.ads (SCO_Unit_Table_Entry): Add a field to keep track of
the corresponding source file index.
* get_scos.ads (Get_SCOs): Add a default value for it.
* par_sco.adb (SCO_Record): Fill the corresponding value.
* scos.h: New.
2014-07-18 Vincent Celier <celier@adacore.com>
* a-strunb-shared.adb, s-auxdec.ads, s-rannum.adb, atree.ads,
urealp.adb, vms_data.ads, lib.ads, s-auxdec-vms_64.ads: Minor
reformatting.
* gnat_ugn.texi: Add documentation for new gnatmem switch -t.
2014-07-18 Thomas Quinot <quinot@adacore.com>
* g-sercom.ads (Set): document possible data loss.
2014-07-18 Ed Schonberg <schonberg@adacore.com>
* exp_attr.adb (Expand_N_Attribute_Reference, cases Input,
Output, Read, Write): If the restriction No_Streams is active,
replace each occurrence of a stream attribute by an explicit
Raise statement.
2014-07-18 Robert Dewar <dewar@adacore.com>
* par_sco.adb, a-reatim.ads, exp_attr.adb, sem_util.adb: Minor * par_sco.adb, a-reatim.ads, exp_attr.adb, sem_util.adb: Minor
reformatting. reformatting.
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1992-2012, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -1096,7 +1096,7 @@ package body Ada.Strings.Unbounded is ...@@ -1096,7 +1096,7 @@ package body Ada.Strings.Unbounded is
-- Otherwise, allocate new shared string and fill it -- Otherwise, allocate new shared string and fill it
else else
DR := Allocate (DL + DL /Growth_Factor); DR := Allocate (DL + DL / Growth_Factor);
DR.Data (1 .. Before - 1) := SR.Data (1 .. Before - 1); DR.Data (1 .. Before - 1) := SR.Data (1 .. Before - 1);
DR.Data (Before .. Before + New_Item'Length - 1) := New_Item; DR.Data (Before .. Before + New_Item'Length - 1) := New_Item;
DR.Data (Before + New_Item'Length .. DL) := DR.Data (Before + New_Item'Length .. DL) :=
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1992-2013, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -3884,7 +3884,7 @@ package Atree is ...@@ -3884,7 +3884,7 @@ package Atree is
end record; end record;
pragma Pack (Node_Record); pragma Pack (Node_Record);
for Node_Record'Size use 8*32; for Node_Record'Size use 8 * 32;
for Node_Record'Alignment use 4; for Node_Record'Alignment use 4;
function E_To_N is new Unchecked_Conversion (Entity_Kind, Node_Kind); function E_To_N is new Unchecked_Conversion (Entity_Kind, Node_Kind);
......
...@@ -5736,11 +5736,7 @@ package body Einfo is ...@@ -5736,11 +5736,7 @@ package body Einfo is
procedure Set_Static_Predicate (Id : E; V : S) is procedure Set_Static_Predicate (Id : E; V : S) is
begin begin
pragma Assert pragma Assert (Is_Discrete_Type (Id) and then Has_Predicates (Id));
(Ekind_In (Id, E_Enumeration_Subtype,
E_Modular_Integer_Subtype,
E_Signed_Integer_Subtype)
and then Has_Predicates (Id));
Set_List25 (Id, V); Set_List25 (Id, V);
end Set_Static_Predicate; end Set_Static_Predicate;
...@@ -9361,7 +9357,9 @@ package body Einfo is ...@@ -9361,7 +9357,9 @@ package body Einfo is
E_Entry_Family => E_Entry_Family =>
Write_Str ("PPC_Wrapper"); Write_Str ("PPC_Wrapper");
when E_Enumeration_Subtype | when E_Enumeration_Type |
E_Enumeration_Subtype |
E_Modular_Integer_Type |
E_Modular_Integer_Subtype | E_Modular_Integer_Subtype |
E_Signed_Integer_Subtype => E_Signed_Integer_Subtype =>
Write_Str ("Static_Predicate"); Write_Str ("Static_Predicate");
......
...@@ -3241,6 +3241,19 @@ package body Exp_Attr is ...@@ -3241,6 +3241,19 @@ package body Exp_Attr is
return; return;
end if; end if;
-- Stream operations can appear in user code even if the restriction
-- No_Streams is active (for example, when instantiating a predefined
-- container). In that case rewrite the attribute as a Raise to
-- prevent any run-time use.
if Restriction_Active (No_Streams) then
Rewrite (N,
Make_Raise_Program_Error (Sloc (N),
Reason => PE_Explicit_Raise));
Set_Etype (N, B_Type);
return;
end if;
-- If there is a TSS for Input, just call it -- If there is a TSS for Input, just call it
Fname := Find_Stream_Subprogram (P_Type, TSS_Stream_Input); Fname := Find_Stream_Subprogram (P_Type, TSS_Stream_Input);
...@@ -4218,6 +4231,19 @@ package body Exp_Attr is ...@@ -4218,6 +4231,19 @@ package body Exp_Attr is
return; return;
end if; end if;
-- Stream operations can appear in user code even if the restriction
-- No_Streams is active (for example, when instantiating a predefined
-- container). In that case rewrite the attribute as a Raise to
-- prevent any run-time use.
if Restriction_Active (No_Streams) then
Rewrite (N,
Make_Raise_Program_Error (Sloc (N),
Reason => PE_Explicit_Raise));
Set_Etype (N, Standard_Void_Type);
return;
end if;
-- If TSS for Output is present, just call it -- If TSS for Output is present, just call it
Pname := Find_Stream_Subprogram (P_Type, TSS_Stream_Output); Pname := Find_Stream_Subprogram (P_Type, TSS_Stream_Output);
...@@ -4845,6 +4871,19 @@ package body Exp_Attr is ...@@ -4845,6 +4871,19 @@ package body Exp_Attr is
return; return;
end if; end if;
-- Stream operations can appear in user code even if the restriction
-- No_Streams is active (for example, when instantiating a predefined
-- container). In that case rewrite the attribute as a Raise to
-- prevent any run-time use.
if Restriction_Active (No_Streams) then
Rewrite (N,
Make_Raise_Program_Error (Sloc (N),
Reason => PE_Explicit_Raise));
Set_Etype (N, B_Type);
return;
end if;
-- The simple case, if there is a TSS for Read, just call it -- The simple case, if there is a TSS for Read, just call it
Pname := Find_Stream_Subprogram (P_Type, TSS_Stream_Read); Pname := Find_Stream_Subprogram (P_Type, TSS_Stream_Read);
...@@ -6545,6 +6584,19 @@ package body Exp_Attr is ...@@ -6545,6 +6584,19 @@ package body Exp_Attr is
return; return;
end if; end if;
-- Stream operations can appear in user code even if the restriction
-- No_Streams is active (for example, when instantiating a predefined
-- container). In that case rewrite the attribute as a Raise to
-- prevent any run-time use.
if Restriction_Active (No_Streams) then
Rewrite (N,
Make_Raise_Program_Error (Sloc (N),
Reason => PE_Explicit_Raise));
Set_Etype (N, U_Type);
return;
end if;
-- The simple case, if there is a TSS for Write, just call it -- The simple case, if there is a TSS for Write, just call it
Pname := Find_Stream_Subprogram (P_Type, TSS_Stream_Write); Pname := Find_Stream_Subprogram (P_Type, TSS_Stream_Write);
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2007-2012, AdaCore -- -- Copyright (C) 2007-2014, AdaCore --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -88,10 +88,13 @@ package GNAT.Serial_Communications is ...@@ -88,10 +88,13 @@ package GNAT.Serial_Communications is
-- the given Timeout (in seconds) is used. If Local is set then modem -- the given Timeout (in seconds) is used. If Local is set then modem
-- control lines (in particular DCD) are ignored (not supported on -- control lines (in particular DCD) are ignored (not supported on
-- Windows). Flow indicates the flow control type as defined above. -- Windows). Flow indicates the flow control type as defined above.
--
-- Note that the timeout precision may be limited on some implementation -- Note: the timeout precision may be limited on some implementation
-- (e.g. on GNU/Linux the maximum precision is a tenth of seconds). -- (e.g. on GNU/Linux the maximum precision is a tenth of seconds).
-- Note: calling this procedure may reinitialize the serial port hardware
-- and thus cause loss of some buffered data if used during communication.
overriding procedure Read overriding procedure Read
(Port : in out Serial_Port; (Port : in out Serial_Port;
Buffer : out Ada.Streams.Stream_Element_Array; Buffer : out Ada.Streams.Stream_Element_Array;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2009-2012, Free Software Foundation, Inc. -- -- Copyright (C) 2009-2014, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -296,10 +296,11 @@ begin ...@@ -296,10 +296,11 @@ begin
-- Make new unit table entry (will fill in To later) -- Make new unit table entry (will fill in To later)
SCO_Unit_Table.Append ( SCO_Unit_Table.Append (
(File_Name => new String'(Buf (1 .. N)), (File_Name => new String'(Buf (1 .. N)),
Dep_Num => Dnum, File_Index => 0,
From => SCO_Table.Last + 1, Dep_Num => Dnum,
To => 0)); From => SCO_Table.Last + 1,
To => 0));
when others => when others =>
raise Program_Error; raise Program_Error;
......
...@@ -18937,6 +18937,13 @@ currently supported criteria are @code{n, h, w} standing respectively for ...@@ -18937,6 +18937,13 @@ currently supported criteria are @code{n, h, w} standing respectively for
number of unfreed allocations, high watermark, and final watermark number of unfreed allocations, high watermark, and final watermark
corresponding to a specific root. The default order is @code{nwh}. corresponding to a specific root. The default order is @code{nwh}.
@item -t
@cindex @option{-t} (@code{gnatmem})
This switch causes memory allocated size to be always output in bytes.
Default @code{gnatmem} behavior is to show memory sizes less then 1 kilobyte
in bytes, from 1 kilobyte till 1 megabyte in kilobytes and the rest in
megabytes.
@end table @end table
@node Example of gnatmem Usage @node Example of gnatmem Usage
...@@ -279,9 +279,9 @@ package Lib is ...@@ -279,9 +279,9 @@ package Lib is
-- This is the number of the unit within the generated dependency -- This is the number of the unit within the generated dependency
-- lines (D lines in the ALI file) which are sorted into alphabetical -- lines (D lines in the ALI file) which are sorted into alphabetical
-- order. The number is ones origin, so a value of 2 refers to the -- order. The number is ones origin, so a value of 2 refers to the
-- second generated D line. The Dependency_Number values are set -- second generated D line. The Dependency_Num values are set as the
-- as the D lines are generated, and are used to generate proper -- D lines are generated, and are used to generate proper unit
-- unit references in the generated xref information and SCO output. -- references in the generated xref information and SCO output.
-- Dynamic_Elab -- Dynamic_Elab
-- A flag indicating if this unit was compiled with dynamic elaboration -- A flag indicating if this unit was compiled with dynamic elaboration
......
...@@ -995,10 +995,11 @@ package body Par_SCO is ...@@ -995,10 +995,11 @@ package body Par_SCO is
-- name and dependency numbers later. -- name and dependency numbers later.
SCO_Unit_Table.Append ( SCO_Unit_Table.Append (
(Dep_Num => 0, (Dep_Num => 0,
File_Name => null, File_Name => null,
From => From, File_Index => Get_Source_File_Index (Sloc (Lu)),
To => SCO_Table.Last)); From => From,
To => SCO_Table.Last));
SCO_Unit_Number_Table.Append (U); SCO_Unit_Number_Table.Append (U);
end SCO_Record; end SCO_Record;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1996-2011, Free Software Foundation, Inc. -- -- Copyright (C) 1996-2014, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -243,37 +243,37 @@ package System.Aux_DEC is ...@@ -243,37 +243,37 @@ package System.Aux_DEC is
-- Conventional names for static subtypes of type UNSIGNED_LONGWORD -- Conventional names for static subtypes of type UNSIGNED_LONGWORD
subtype Unsigned_1 is Unsigned_Longword range 0 .. 2** 1-1; subtype Unsigned_1 is Unsigned_Longword range 0 .. 2** 1 - 1;
subtype Unsigned_2 is Unsigned_Longword range 0 .. 2** 2-1; subtype Unsigned_2 is Unsigned_Longword range 0 .. 2** 2 - 1;
subtype Unsigned_3 is Unsigned_Longword range 0 .. 2** 3-1; subtype Unsigned_3 is Unsigned_Longword range 0 .. 2** 3 - 1;
subtype Unsigned_4 is Unsigned_Longword range 0 .. 2** 4-1; subtype Unsigned_4 is Unsigned_Longword range 0 .. 2** 4 - 1;
subtype Unsigned_5 is Unsigned_Longword range 0 .. 2** 5-1; subtype Unsigned_5 is Unsigned_Longword range 0 .. 2** 5 - 1;
subtype Unsigned_6 is Unsigned_Longword range 0 .. 2** 6-1; subtype Unsigned_6 is Unsigned_Longword range 0 .. 2** 6 - 1;
subtype Unsigned_7 is Unsigned_Longword range 0 .. 2** 7-1; subtype Unsigned_7 is Unsigned_Longword range 0 .. 2** 7 - 1;
subtype Unsigned_8 is Unsigned_Longword range 0 .. 2** 8-1; subtype Unsigned_8 is Unsigned_Longword range 0 .. 2** 8 - 1;
subtype Unsigned_9 is Unsigned_Longword range 0 .. 2** 9-1; subtype Unsigned_9 is Unsigned_Longword range 0 .. 2** 9 - 1;
subtype Unsigned_10 is Unsigned_Longword range 0 .. 2**10-1; subtype Unsigned_10 is Unsigned_Longword range 0 .. 2**10 - 1;
subtype Unsigned_11 is Unsigned_Longword range 0 .. 2**11-1; subtype Unsigned_11 is Unsigned_Longword range 0 .. 2**11 - 1;
subtype Unsigned_12 is Unsigned_Longword range 0 .. 2**12-1; subtype Unsigned_12 is Unsigned_Longword range 0 .. 2**12 - 1;
subtype Unsigned_13 is Unsigned_Longword range 0 .. 2**13-1; subtype Unsigned_13 is Unsigned_Longword range 0 .. 2**13 - 1;
subtype Unsigned_14 is Unsigned_Longword range 0 .. 2**14-1; subtype Unsigned_14 is Unsigned_Longword range 0 .. 2**14 - 1;
subtype Unsigned_15 is Unsigned_Longword range 0 .. 2**15-1; subtype Unsigned_15 is Unsigned_Longword range 0 .. 2**15 - 1;
subtype Unsigned_16 is Unsigned_Longword range 0 .. 2**16-1; subtype Unsigned_16 is Unsigned_Longword range 0 .. 2**16 - 1;
subtype Unsigned_17 is Unsigned_Longword range 0 .. 2**17-1; subtype Unsigned_17 is Unsigned_Longword range 0 .. 2**17 - 1;
subtype Unsigned_18 is Unsigned_Longword range 0 .. 2**18-1; subtype Unsigned_18 is Unsigned_Longword range 0 .. 2**18 - 1;
subtype Unsigned_19 is Unsigned_Longword range 0 .. 2**19-1; subtype Unsigned_19 is Unsigned_Longword range 0 .. 2**19 - 1;
subtype Unsigned_20 is Unsigned_Longword range 0 .. 2**20-1; subtype Unsigned_20 is Unsigned_Longword range 0 .. 2**20 - 1;
subtype Unsigned_21 is Unsigned_Longword range 0 .. 2**21-1; subtype Unsigned_21 is Unsigned_Longword range 0 .. 2**21 - 1;
subtype Unsigned_22 is Unsigned_Longword range 0 .. 2**22-1; subtype Unsigned_22 is Unsigned_Longword range 0 .. 2**22 - 1;
subtype Unsigned_23 is Unsigned_Longword range 0 .. 2**23-1; subtype Unsigned_23 is Unsigned_Longword range 0 .. 2**23 - 1;
subtype Unsigned_24 is Unsigned_Longword range 0 .. 2**24-1; subtype Unsigned_24 is Unsigned_Longword range 0 .. 2**24 - 1;
subtype Unsigned_25 is Unsigned_Longword range 0 .. 2**25-1; subtype Unsigned_25 is Unsigned_Longword range 0 .. 2**25 - 1;
subtype Unsigned_26 is Unsigned_Longword range 0 .. 2**26-1; subtype Unsigned_26 is Unsigned_Longword range 0 .. 2**26 - 1;
subtype Unsigned_27 is Unsigned_Longword range 0 .. 2**27-1; subtype Unsigned_27 is Unsigned_Longword range 0 .. 2**27 - 1;
subtype Unsigned_28 is Unsigned_Longword range 0 .. 2**28-1; subtype Unsigned_28 is Unsigned_Longword range 0 .. 2**28 - 1;
subtype Unsigned_29 is Unsigned_Longword range 0 .. 2**29-1; subtype Unsigned_29 is Unsigned_Longword range 0 .. 2**29 - 1;
subtype Unsigned_30 is Unsigned_Longword range 0 .. 2**30-1; subtype Unsigned_30 is Unsigned_Longword range 0 .. 2**30 - 1;
subtype Unsigned_31 is Unsigned_Longword range 0 .. 2**31-1; subtype Unsigned_31 is Unsigned_Longword range 0 .. 2**31 - 1;
-- Function for obtaining global symbol values -- Function for obtaining global symbol values
......
...@@ -6,8 +6,6 @@ ...@@ -6,8 +6,6 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1996-2011, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- -- -- ware Foundation; either version 3, or (at your option) any later ver- --
...@@ -229,37 +227,37 @@ package System.Aux_DEC is ...@@ -229,37 +227,37 @@ package System.Aux_DEC is
-- Conventional names for static subtypes of type UNSIGNED_LONGWORD -- Conventional names for static subtypes of type UNSIGNED_LONGWORD
subtype Unsigned_1 is Unsigned_Longword range 0 .. 2** 1-1; subtype Unsigned_1 is Unsigned_Longword range 0 .. 2** 1 - 1;
subtype Unsigned_2 is Unsigned_Longword range 0 .. 2** 2-1; subtype Unsigned_2 is Unsigned_Longword range 0 .. 2** 2 - 1;
subtype Unsigned_3 is Unsigned_Longword range 0 .. 2** 3-1; subtype Unsigned_3 is Unsigned_Longword range 0 .. 2** 3 - 1;
subtype Unsigned_4 is Unsigned_Longword range 0 .. 2** 4-1; subtype Unsigned_4 is Unsigned_Longword range 0 .. 2** 4 - 1;
subtype Unsigned_5 is Unsigned_Longword range 0 .. 2** 5-1; subtype Unsigned_5 is Unsigned_Longword range 0 .. 2** 5 - 1;
subtype Unsigned_6 is Unsigned_Longword range 0 .. 2** 6-1; subtype Unsigned_6 is Unsigned_Longword range 0 .. 2** 6 - 1;
subtype Unsigned_7 is Unsigned_Longword range 0 .. 2** 7-1; subtype Unsigned_7 is Unsigned_Longword range 0 .. 2** 7 - 1;
subtype Unsigned_8 is Unsigned_Longword range 0 .. 2** 8-1; subtype Unsigned_8 is Unsigned_Longword range 0 .. 2** 8 - 1;
subtype Unsigned_9 is Unsigned_Longword range 0 .. 2** 9-1; subtype Unsigned_9 is Unsigned_Longword range 0 .. 2** 9 - 1;
subtype Unsigned_10 is Unsigned_Longword range 0 .. 2**10-1; subtype Unsigned_10 is Unsigned_Longword range 0 .. 2**10 - 1;
subtype Unsigned_11 is Unsigned_Longword range 0 .. 2**11-1; subtype Unsigned_11 is Unsigned_Longword range 0 .. 2**11 - 1;
subtype Unsigned_12 is Unsigned_Longword range 0 .. 2**12-1; subtype Unsigned_12 is Unsigned_Longword range 0 .. 2**12 - 1;
subtype Unsigned_13 is Unsigned_Longword range 0 .. 2**13-1; subtype Unsigned_13 is Unsigned_Longword range 0 .. 2**13 - 1;
subtype Unsigned_14 is Unsigned_Longword range 0 .. 2**14-1; subtype Unsigned_14 is Unsigned_Longword range 0 .. 2**14 - 1;
subtype Unsigned_15 is Unsigned_Longword range 0 .. 2**15-1; subtype Unsigned_15 is Unsigned_Longword range 0 .. 2**15 - 1;
subtype Unsigned_16 is Unsigned_Longword range 0 .. 2**16-1; subtype Unsigned_16 is Unsigned_Longword range 0 .. 2**16 - 1;
subtype Unsigned_17 is Unsigned_Longword range 0 .. 2**17-1; subtype Unsigned_17 is Unsigned_Longword range 0 .. 2**17 - 1;
subtype Unsigned_18 is Unsigned_Longword range 0 .. 2**18-1; subtype Unsigned_18 is Unsigned_Longword range 0 .. 2**18 - 1;
subtype Unsigned_19 is Unsigned_Longword range 0 .. 2**19-1; subtype Unsigned_19 is Unsigned_Longword range 0 .. 2**19 - 1;
subtype Unsigned_20 is Unsigned_Longword range 0 .. 2**20-1; subtype Unsigned_20 is Unsigned_Longword range 0 .. 2**20 - 1;
subtype Unsigned_21 is Unsigned_Longword range 0 .. 2**21-1; subtype Unsigned_21 is Unsigned_Longword range 0 .. 2**21 - 1;
subtype Unsigned_22 is Unsigned_Longword range 0 .. 2**22-1; subtype Unsigned_22 is Unsigned_Longword range 0 .. 2**22 - 1;
subtype Unsigned_23 is Unsigned_Longword range 0 .. 2**23-1; subtype Unsigned_23 is Unsigned_Longword range 0 .. 2**23 - 1;
subtype Unsigned_24 is Unsigned_Longword range 0 .. 2**24-1; subtype Unsigned_24 is Unsigned_Longword range 0 .. 2**24 - 1;
subtype Unsigned_25 is Unsigned_Longword range 0 .. 2**25-1; subtype Unsigned_25 is Unsigned_Longword range 0 .. 2**25 - 1;
subtype Unsigned_26 is Unsigned_Longword range 0 .. 2**26-1; subtype Unsigned_26 is Unsigned_Longword range 0 .. 2**26 - 1;
subtype Unsigned_27 is Unsigned_Longword range 0 .. 2**27-1; subtype Unsigned_27 is Unsigned_Longword range 0 .. 2**27 - 1;
subtype Unsigned_28 is Unsigned_Longword range 0 .. 2**28-1; subtype Unsigned_28 is Unsigned_Longword range 0 .. 2**28 - 1;
subtype Unsigned_29 is Unsigned_Longword range 0 .. 2**29-1; subtype Unsigned_29 is Unsigned_Longword range 0 .. 2**29 - 1;
subtype Unsigned_30 is Unsigned_Longword range 0 .. 2**30-1; subtype Unsigned_30 is Unsigned_Longword range 0 .. 2**30 - 1;
subtype Unsigned_31 is Unsigned_Longword range 0 .. 2**31-1; subtype Unsigned_31 is Unsigned_Longword range 0 .. 2**31 - 1;
-- Function for obtaining global symbol values -- Function for obtaining global symbol values
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2007-2012, Free Software Foundation, Inc. -- -- Copyright (C) 2007-2014, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -103,7 +103,7 @@ package body System.Random_Numbers is ...@@ -103,7 +103,7 @@ package body System.Random_Numbers is
-- Algorithmic Parameters -- -- Algorithmic Parameters --
---------------------------- ----------------------------
Lower_Mask : constant := 2**31-1; Lower_Mask : constant := 2**31 - 1;
Upper_Mask : constant := 2**31; Upper_Mask : constant := 2**31;
Matrix_A : constant array (State_Val range 0 .. 1) of State_Val Matrix_A : constant array (State_Val range 0 .. 1) of State_Val
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2009-2013, Free Software Foundation, Inc. -- -- Copyright (C) 2009-2014, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -49,6 +49,9 @@ package SCOs is ...@@ -49,6 +49,9 @@ package SCOs is
-- Put_SCO reads the internal tables and generates text lines in the ALI -- Put_SCO reads the internal tables and generates text lines in the ALI
-- format. -- format.
-- WARNING: There are C bindings for this package. Any changes to this
-- source file must be properly reflected in the C header file scos.h
-------------------- --------------------
-- SCO ALI Format -- -- SCO ALI Format --
-------------------- --------------------
...@@ -497,6 +500,9 @@ package SCOs is ...@@ -497,6 +500,9 @@ package SCOs is
File_Name : String_Ptr; File_Name : String_Ptr;
-- Pointer to file name in ALI file -- Pointer to file name in ALI file
File_Index : Source_File_Index;
-- Index for the source file
Dep_Num : Nat; Dep_Num : Nat;
-- Dependency number in ALI file -- Dependency number in ALI file
......
/****************************************************************************
* *
* GNAT COMPILER COMPONENTS *
* *
* S C O S *
* *
* C Header File *
* *
* Copyright (C) 2014, 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- *
* ware Foundation; either version 3, or (at your option) any later ver- *
* sion. GNAT is distributed in the hope that it will be useful, but WITH- *
* OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
* for more details. You should have received a copy of the GNU General *
* Public License distributed with GNAT; see file COPYING3. If not, go to *
* http://www.gnu.org/licenses for a complete copy of the license. *
* *
* GNAT was originally developed by the GNAT team at New York University. *
* Extensive contributions were provided by Ada Core Technologies Inc. *
* *
****************************************************************************/
/* This is the C file that corresponds to the Ada package spec SCOs. It was
created manually from the file scos.ads. */
#ifdef __cplusplus
extern "C" {
#endif
/* Unit table: */
typedef Int SCO_Unit_Index;
struct SCO_Unit_Table_Entry
{
Fat_Pointer File_Name;
Int File_Index;
Nat Dep_Num;
Nat From, To;
};
typedef struct SCO_Unit_Table_Entry *SCO_Unit_Table_Type;
extern SCO_Unit_Table_Type scos__sco_unit_table__table;
#define SCO_Unit_Table scos__sco_unit_table__table
extern Int scos__sco_unit_table__min;
#define SCO_Unit_Table_Min scos__sco_unit_table__min
extern Int scos__sco_unit_table__last_val;
#define SCO_Unit_Table_Last_Val scos__sco_unit_table__last_val
/* SCOs table: */
struct Source_Location
{
Line_Number_Type Line;
Column_Number_Type Col;
};
struct SCO_Table_Entry
{
struct Source_Location From, To;
char C1, C2;
bool Last;
Source_Ptr Pragma_Sloc;
Name_Id Pragma_Aspect_Name;
};
typedef struct SCO_Table_Entry *SCO_Table_Type;
extern SCO_Table_Type scos__sco_table__table;
#define SCO_Table scos__sco_table__table
extern Int scos__sco_table__min;
#define SCO_Table_Min scos__sco_table__min
extern Int scos__sco_table__last_val;
#define SCO_Table_Last_Val scos__sco_table__last_val
#ifdef __cplusplus
}
#endif
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -1581,6 +1581,7 @@ package body Sem_Util is ...@@ -1581,6 +1581,7 @@ package body Sem_Util is
if Compile_Time_Known_Value (Expr) if Compile_Time_Known_Value (Expr)
and then Has_Predicates (Typ) and then Has_Predicates (Typ)
and then Is_Discrete_Type (Typ)
and then Present (Static_Predicate (Typ)) and then Present (Static_Predicate (Typ))
and then not Has_Dynamic_Predicate_Aspect (Typ) and then not Has_Dynamic_Predicate_Aspect (Typ)
then then
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1992-2013, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -1354,13 +1354,13 @@ package body Urealp is ...@@ -1354,13 +1354,13 @@ package body Urealp is
and then Val.Den >= -16 and then Val.Den >= -16
then then
if Val.Den = 1 then if Val.Den = 1 then
T := Val.Num * (10/2); T := Val.Num * (10 / 2);
UI_Write (T / 10, Decimal); UI_Write (T / 10, Decimal);
Write_Char ('.'); Write_Char ('.');
UI_Write (T mod 10, Decimal); UI_Write (T mod 10, Decimal);
elsif Val.Den = 2 then elsif Val.Den = 2 then
T := Val.Num * (100/4); T := Val.Num * (100 / 4);
UI_Write (T / 100, Decimal); UI_Write (T / 100, Decimal);
Write_Char ('.'); Write_Char ('.');
UI_Write (T mod 100 / 10, Decimal); UI_Write (T mod 100 / 10, Decimal);
......
...@@ -5677,30 +5677,30 @@ package VMS_Data is ...@@ -5677,30 +5677,30 @@ package VMS_Data is
-- --
-- All combinations of line metrics options are allowed. -- All combinations of line metrics options are allowed.
S_Metric_Complexity : aliased constant S := "/COMPLEXITY_METRICS=" & S_Metric_Complexity : aliased constant S := "/COMPLEXITY_METRICS=" &
"ALL " & "ALL " &
"--complexity-all " & "--complexity-all " &
"NONE " & "NONE " &
"--no-complexity-all " & "--no-complexity-all " &
"CYCLOMATIC " & "CYCLOMATIC " &
"--complexity-cyclomatic " & "--complexity-cyclomatic " &
"NOCYCLOMATIC " & "NOCYCLOMATIC " &
"--no-complexity-cyclomatic "& "--no-complexity-cyclomatic " &
"ESSENTIAL " & "ESSENTIAL " &
"--complexity-essential " & "--complexity-essential " &
"NOESSENTIAL " & "NOESSENTIAL " &
"--no-complexity-essential " & "--no-complexity-essential " &
"LOOP_NESTING " & "LOOP_NESTING " &
"--loop-nesting " & "--loop-nesting " &
"NOLOOP_NESTING " & "NOLOOP_NESTING " &
"--no-loop-nesting " & "--no-loop-nesting " &
"AVERAGE_COMPLEXITY " & "AVERAGE_COMPLEXITY " &
"--complexity-average " & "--complexity-average " &
"NOAVERAGE_COMPLEXITY " & "NOAVERAGE_COMPLEXITY " &
"--no-complexity-average " & "--no-complexity-average " &
"EXTRA_EXIT_POINTS " & "EXTRA_EXIT_POINTS " &
"--extra-exit-points " & "--extra-exit-points " &
"NOEXTRA_EXIT_POINTS " & "NOEXTRA_EXIT_POINTS " &
"--no-extra-exit-points"; "--no-extra-exit-points";
-- /COMPLEXITY_METRICS=(option, option ...) -- /COMPLEXITY_METRICS=(option, option ...)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment