Commit e95ad7ea by Robert Dewar Committed by Arnaud Charlet

gnat_ugn.texi: Document new switch -gnato0.

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

	* gnat_ugn.texi: Document new switch -gnato0.
	* sem_ch3.ads: Minor reformatting.
	* gnatlink.adb (Process_Args): Compile bind file with -gnato0
	(we do not want overflow checks when incrementing elaboration
	counters).
	* einfo.ads: Minor reformatting.

From-SVN: r213328
parent e9a79435
2014-07-31 Robert Dewar <dewar@adacore.com> 2014-07-31 Robert Dewar <dewar@adacore.com>
* gnat_ugn.texi: Document new switch -gnato0.
* sem_ch3.ads: Minor reformatting.
* gnatlink.adb (Process_Args): Compile bind file with -gnato0
(we do not want overflow checks when incrementing elaboration
counters).
* einfo.ads: Minor reformatting.
2014-07-31 Robert Dewar <dewar@adacore.com>
* exp_ch5.adb, freeze.adb, exp_ch3.adb: Minor comment correction. * exp_ch5.adb, freeze.adb, exp_ch3.adb: Minor comment correction.
* s-arit64.adb: Minor reformatting. * s-arit64.adb: Minor reformatting.
......
...@@ -47,10 +47,10 @@ package Einfo is ...@@ -47,10 +47,10 @@ package Einfo is
-- and they correspond to conventional symbol table information. Other -- and they correspond to conventional symbol table information. Other
-- attributes include sets of meanings for overloaded names, possible -- attributes include sets of meanings for overloaded names, possible
-- types for overloaded expressions, flags to indicate deferred constants, -- types for overloaded expressions, flags to indicate deferred constants,
-- incomplete types, etc. These attributes are stored in available fields -- incomplete types, etc. These attributes are stored in available fields in
-- in tree nodes (i.e. fields not used by the parser, as defined by the -- tree nodes (i.e. fields not used by the parser, as defined by the Sinfo
-- Sinfo package specification), and accessed by means of a set of -- package specification), and accessed by means of a set of subprograms
-- subprograms which define an abstract interface. -- which define an abstract interface.
-- There are two kinds of semantic information -- There are two kinds of semantic information
...@@ -82,10 +82,9 @@ package Einfo is ...@@ -82,10 +82,9 @@ package Einfo is
-------------------------------- --------------------------------
-- XEINFO is a utility program which automatically produces a C header file, -- XEINFO is a utility program which automatically produces a C header file,
-- einfo.h from the spec and body of package Einfo. It reads the input -- einfo.h from the spec and body of package Einfo. It reads the input files
-- files einfo.ads and einfo.adb and produces the output file einfo.h. -- einfo.ads and einfo.adb and produces the output file einfo.h. XEINFO is run
-- XEINFO is run automatically by the build scripts when you do a full -- automatically by the build scripts when you do a full bootstrap.
-- bootstrap.
-- In order for this utility program to operate correctly, the form of the -- In order for this utility program to operate correctly, the form of the
-- einfo.ads and einfo.adb files must meet certain requirements and be laid -- einfo.ads and einfo.adb files must meet certain requirements and be laid
...@@ -302,13 +301,13 @@ package Einfo is ...@@ -302,13 +301,13 @@ package Einfo is
-- access functions and set procedures to set the corresponding values, while -- access functions and set procedures to set the corresponding values, while
-- synthesized attributes have only access functions. -- synthesized attributes have only access functions.
-- Note: in the case of Node, Uint, or Elist fields, there are cases where -- Note: in the case of Node, Uint, or Elist fields, there are cases where the
-- the same physical field is used for different purposes in different -- same physical field is used for different purposes in different entities,
-- entities, so these access functions should only be referenced for the -- so these access functions should only be referenced for the class of
-- class of entities in which they are defined as being present. Flags are -- entities in which they are defined as being present. Flags are not
-- not overlapped in this way, but nevertheless as a matter of style and -- overlapped in this way, but nevertheless as a matter of style and
-- abstraction (which may or may not be checked by assertions in the body), -- abstraction (which may or may not be checked by assertions in the
-- this restriction should be observed for flag fields as well. -- body), this restriction should be observed for flag fields as well.
-- Note: certain of the attributes on types apply only to base types, and -- Note: certain of the attributes on types apply only to base types, and
-- are so noted by the notation [base type only]. These are cases where the -- are so noted by the notation [base type only]. These are cases where the
...@@ -390,8 +389,8 @@ package Einfo is ...@@ -390,8 +389,8 @@ package Einfo is
-- case of subprograms to control output of certain warnings. -- case of subprograms to control output of certain warnings.
-- Aft_Value (synthesized) -- Aft_Value (synthesized)
-- Applies to fixed and decimal types. Computes a universal integer -- Applies to fixed and decimal types. Computes a universal integer that
-- that holds value of the Aft attribute for the type. -- holds value of the Aft attribute for the type.
-- Alias (Node18) -- Alias (Node18)
-- Defined in overloadable entities (literals, subprograms, entries) and -- Defined in overloadable entities (literals, subprograms, entries) and
......
...@@ -4201,6 +4201,13 @@ of GNAT other than the JGNAT, .NET or GNAAMP versions), then the use of ...@@ -4201,6 +4201,13 @@ of GNAT other than the JGNAT, .NET or GNAAMP versions), then the use of
Historically front end inlining was more extensive than the gcc back end Historically front end inlining was more extensive than the gcc back end
inlining, but that is no longer the case. inlining, but that is no longer the case.
@item -gnato0
@cindex @option{-gnato0} (@command{gcc})
Suppresses overflow checking. This causes the behavior of the compiler to
match the default for older versions where overflow checking was suppressed
by default. This is equivalent to having
@code{pragma Suppress (Overflow_Mode)} in a configuration pragma file.
@item -gnato?? @item -gnato??
@cindex @option{-gnato??} (@command{gcc}) @cindex @option{-gnato??} (@command{gcc})
Set default mode for handling generation of code to avoid intermediate Set default mode for handling generation of code to avoid intermediate
...@@ -4226,11 +4233,11 @@ If no digits follow the @option{-gnato}, then it is equivalent to ...@@ -4226,11 +4233,11 @@ If no digits follow the @option{-gnato}, then it is equivalent to
causing all intermediate overflows to be handled in strict mode. causing all intermediate overflows to be handled in strict mode.
This switch also causes arithmetic overflow checking to be performed This switch also causes arithmetic overflow checking to be performed
(as though pragma @code{Unsuppress (Overflow_Mode)} has been specified. (as though @code{pragma Unsuppress (Overflow_Mode)} had been specified.
The default if no option @option{-gnato} is given is that overflow handling The default if no option @option{-gnato} is given is that overflow handling
is in @code{STRICT} mode (computations done using the base type), and that is in @code{STRICT} mode (computations done using the base type), and that
overflow checking is suppressed. overflow checking is enabled.
Note that division by zero is a separate check that is not Note that division by zero is a separate check that is not
controlled by this switch (division by zero checking is on by default). controlled by this switch (division by zero checking is on by default).
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1996-2013, 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- --
...@@ -676,6 +676,12 @@ procedure Gnatlink is ...@@ -676,6 +676,12 @@ procedure Gnatlink is
Binder_Options.Increment_Last; Binder_Options.Increment_Last;
Binder_Options.Table (Binder_Options.Last) := new String'("-gnatws"); Binder_Options.Table (Binder_Options.Last) := new String'("-gnatws");
-- Also suppress overflow checks (needed now that we have them on by
-- default, we want checks off when incrementing elaboration counters).
Binder_Options.Increment_Last;
Binder_Options.Table (Binder_Options.Last) := new String'("-gnato0");
-- If we did not get an ali file at all, and we had at least one -- If we did not get an ali file at all, and we had at least one
-- linker option, then assume that was the intended ali file after -- linker option, then assume that was the intended ali file after
-- all, so that we get a nicer message later on. -- all, so that we get a nicer message later on.
......
...@@ -50,18 +50,18 @@ package Sem_Ch3 is ...@@ -50,18 +50,18 @@ package Sem_Ch3 is
(Related_Nod : Node_Id; (Related_Nod : Node_Id;
N : Node_Id) return Entity_Id; N : Node_Id) return Entity_Id;
-- An access definition defines a general access type for a formal -- An access definition defines a general access type for a formal
-- parameter. The procedure is called when processing formals, when -- parameter. The procedure is called when processing formals, when the
-- the current scope is the subprogram. The Implicit type is attached -- current scope is the subprogram. The Implicit type is attached to the
-- to the Related_Nod put into the enclosing scope, so that the only -- Related_Nod put into the enclosing scope, so that the only entities
-- entities defined in the spec are the formals themselves. -- defined in the spec are the formals themselves.
procedure Access_Subprogram_Declaration procedure Access_Subprogram_Declaration
(T_Name : Entity_Id; (T_Name : Entity_Id;
T_Def : Node_Id); T_Def : Node_Id);
-- The subprogram specification yields the signature of an implicit -- The subprogram specification yields the signature of an implicit
-- type, whose Ekind is Access_Subprogram_Type. This implicit type is -- type, whose Ekind is Access_Subprogram_Type. This implicit type is the
-- the designated type of the declared access type. In subprogram calls, -- designated type of the declared access type. In subprogram calls, the
-- the signature of the implicit type works like the profile of a regular -- signature of the implicit type works like the profile of a regular
-- subprogram. -- subprogram.
procedure Add_Internal_Interface_Entities (Tagged_Type : Entity_Id); procedure Add_Internal_Interface_Entities (Tagged_Type : Entity_Id);
...@@ -94,8 +94,8 @@ package Sem_Ch3 is ...@@ -94,8 +94,8 @@ package Sem_Ch3 is
-- enclosing declaration that generated Ityp. -- enclosing declaration that generated Ityp.
-- --
-- A related mechanism is used during expansion, for itypes created in -- A related mechanism is used during expansion, for itypes created in
-- branches of conditionals. See Ensure_Defined in exp_util. -- branches of conditionals. See Ensure_Defined in exp_util. Could both
-- Could both mechanisms be merged ??? -- mechanisms be merged ???
procedure Check_Abstract_Overriding (T : Entity_Id); procedure Check_Abstract_Overriding (T : Entity_Id);
-- Check that all abstract subprograms inherited from T's parent type have -- Check that all abstract subprograms inherited from T's parent type have
...@@ -126,11 +126,11 @@ package Sem_Ch3 is ...@@ -126,11 +126,11 @@ package Sem_Ch3 is
Parent_Type : Entity_Id; Parent_Type : Entity_Id;
Actual_Subp : Entity_Id := Empty); Actual_Subp : Entity_Id := Empty);
-- Derive the subprogram Parent_Subp from Parent_Type, and replace the -- Derive the subprogram Parent_Subp from Parent_Type, and replace the
-- subsidiary subtypes with the derived type to build the specification -- subsidiary subtypes with the derived type to build the specification of
-- of the inherited subprogram (returned in New_Subp). For tagged types, -- the inherited subprogram (returned in New_Subp). For tagged types, the
-- the derived subprogram is aliased to that of the actual (in the -- derived subprogram is aliased to that of the actual (in the case where
-- case where Actual_Subp is nonempty) rather than to the corresponding -- Actual_Subp is nonempty) rather than to the corresponding subprogram of
-- subprogram of the parent type. -- the parent type.
procedure Derive_Subprograms procedure Derive_Subprograms
(Parent_Type : Entity_Id; (Parent_Type : Entity_Id;
...@@ -183,10 +183,10 @@ package Sem_Ch3 is ...@@ -183,10 +183,10 @@ package Sem_Ch3 is
(C : Entity_Id; (C : Entity_Id;
N : Node_Id := Empty) return Boolean; N : Node_Id := Empty) return Boolean;
-- Determines if a record component C is visible in the present context. -- Determines if a record component C is visible in the present context.
-- Note that even though component C could appear in the entity chain -- Note that even though component C could appear in the entity chain of a
-- of a record type, C may not be visible in the current context. For -- record type, C may not be visible in the current context. For instance,
-- instance, C may be a component inherited in the full view of a private -- C may be a component inherited in the full view of a private extension
-- extension which is not visible in the current context. -- which is not visible in the current context.
-- --
-- If present, N is the selected component of which C is the selector. If -- If present, N is the selected component of which C is the selector. If
-- the prefix of N is a type conversion inserted for a discriminant check, -- the prefix of N is a type conversion inserted for a discriminant check,
...@@ -199,9 +199,9 @@ package Sem_Ch3 is ...@@ -199,9 +199,9 @@ package Sem_Ch3 is
Suffix_Index : Nat := 1; Suffix_Index : Nat := 1;
In_Iter_Schm : Boolean := False); In_Iter_Schm : Boolean := False);
-- Process an index that is given in an array declaration, an entry -- Process an index that is given in an array declaration, an entry
-- family declaration or a loop iteration. The index is given by an -- family declaration or a loop iteration. The index is given by an index
-- index declaration (a 'box'), or by a discrete range. The later can -- declaration (a 'box'), or by a discrete range. The later can be the name
-- be the name of a discrete type, or a subtype indication. -- of a discrete type, or a subtype indication.
-- --
-- Related_Nod is the node where the potential generated implicit types -- Related_Nod is the node where the potential generated implicit types
-- will be inserted. The next last parameters are used for creating the -- will be inserted. The next last parameters are used for creating the
...@@ -298,12 +298,12 @@ package Sem_Ch3 is ...@@ -298,12 +298,12 @@ package Sem_Ch3 is
(N : Node_Id; (N : Node_Id;
Prev : Entity_Id := Empty); Prev : Entity_Id := Empty);
-- Process the discriminants contained in an N_Full_Type_Declaration or -- Process the discriminants contained in an N_Full_Type_Declaration or
-- N_Incomplete_Type_Decl node N. If the declaration is a completion, -- N_Incomplete_Type_Decl node N. If the declaration is a completion, Prev
-- Prev is entity on the partial view, on which references are posted. -- is entity on the partial view, on which references are posted. However,
-- However, note that Process_Discriminants is called for a completion only -- note that Process_Discriminants is called for a completion only if
-- if partial view had no discriminants (else we just check conformance -- partial view had no discriminants (else we just check conformance
-- between the two views and do not call Process_Discriminants again for -- between the two views and do not call Process_Discriminants again
-- the completion). -- for the completion).
function Replace_Anonymous_Access_To_Protected_Subprogram function Replace_Anonymous_Access_To_Protected_Subprogram
(N : Node_Id) return Entity_Id; (N : Node_Id) return Entity_Id;
......
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