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
This commit is contained in:
parent
e9a794351b
commit
e95ad7ea78
@ -1,3 +1,12 @@
|
||||
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.
|
||||
|
@ -47,10 +47,10 @@ package Einfo is
|
||||
-- and they correspond to conventional symbol table information. Other
|
||||
-- attributes include sets of meanings for overloaded names, possible
|
||||
-- types for overloaded expressions, flags to indicate deferred constants,
|
||||
-- incomplete types, etc. These attributes are stored in available fields
|
||||
-- in tree nodes (i.e. fields not used by the parser, as defined by the
|
||||
-- Sinfo package specification), and accessed by means of a set of
|
||||
-- subprograms which define an abstract interface.
|
||||
-- incomplete types, etc. These attributes are stored in available fields in
|
||||
-- tree nodes (i.e. fields not used by the parser, as defined by the Sinfo
|
||||
-- package specification), and accessed by means of a set of subprograms
|
||||
-- which define an abstract interface.
|
||||
|
||||
-- There are two kinds of semantic information
|
||||
|
||||
@ -82,10 +82,9 @@ package Einfo is
|
||||
--------------------------------
|
||||
|
||||
-- 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
|
||||
-- files einfo.ads and einfo.adb and produces the output file einfo.h.
|
||||
-- XEINFO is run automatically by the build scripts when you do a full
|
||||
-- bootstrap.
|
||||
-- einfo.h from the spec and body of package Einfo. It reads the input files
|
||||
-- einfo.ads and einfo.adb and produces the output file einfo.h. XEINFO is run
|
||||
-- automatically by the build scripts when you do a full bootstrap.
|
||||
|
||||
-- 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
|
||||
@ -302,13 +301,13 @@ package Einfo is
|
||||
-- access functions and set procedures to set the corresponding values, while
|
||||
-- synthesized attributes have only access functions.
|
||||
|
||||
-- Note: in the case of Node, Uint, or Elist fields, there are cases where
|
||||
-- the same physical field is used for different purposes in different
|
||||
-- entities, so these access functions should only be referenced for the
|
||||
-- class of entities in which they are defined as being present. Flags are
|
||||
-- not 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),
|
||||
-- this restriction should be observed for flag fields as well.
|
||||
-- Note: in the case of Node, Uint, or Elist fields, there are cases where the
|
||||
-- same physical field is used for different purposes in different entities,
|
||||
-- so these access functions should only be referenced for the class of
|
||||
-- entities in which they are defined as being present. Flags are not
|
||||
-- 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), this restriction should be observed for flag fields as well.
|
||||
|
||||
-- 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
|
||||
@ -390,8 +389,8 @@ package Einfo is
|
||||
-- case of subprograms to control output of certain warnings.
|
||||
|
||||
-- Aft_Value (synthesized)
|
||||
-- Applies to fixed and decimal types. Computes a universal integer
|
||||
-- that holds value of the Aft attribute for the type.
|
||||
-- Applies to fixed and decimal types. Computes a universal integer that
|
||||
-- holds value of the Aft attribute for the type.
|
||||
|
||||
-- Alias (Node18)
|
||||
-- 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
|
||||
Historically front end inlining was more extensive than the gcc back end
|
||||
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??
|
||||
@cindex @option{-gnato??} (@command{gcc})
|
||||
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
|
||||
causing all intermediate overflows to be handled in strict mode.
|
||||
|
||||
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
|
||||
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
|
||||
controlled by this switch (division by zero checking is on by default).
|
||||
|
@ -6,7 +6,7 @@
|
||||
-- --
|
||||
-- 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 --
|
||||
-- terms of the GNU General Public License as published by the Free Soft- --
|
||||
@ -676,6 +676,12 @@ procedure Gnatlink is
|
||||
Binder_Options.Increment_Last;
|
||||
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
|
||||
-- linker option, then assume that was the intended ali file after
|
||||
-- all, so that we get a nicer message later on.
|
||||
|
@ -50,18 +50,18 @@ package Sem_Ch3 is
|
||||
(Related_Nod : Node_Id;
|
||||
N : Node_Id) return Entity_Id;
|
||||
-- An access definition defines a general access type for a formal
|
||||
-- parameter. The procedure is called when processing formals, when
|
||||
-- the current scope is the subprogram. The Implicit type is attached
|
||||
-- to the Related_Nod put into the enclosing scope, so that the only
|
||||
-- entities defined in the spec are the formals themselves.
|
||||
-- parameter. The procedure is called when processing formals, when the
|
||||
-- current scope is the subprogram. The Implicit type is attached to the
|
||||
-- Related_Nod put into the enclosing scope, so that the only entities
|
||||
-- defined in the spec are the formals themselves.
|
||||
|
||||
procedure Access_Subprogram_Declaration
|
||||
(T_Name : Entity_Id;
|
||||
T_Def : Node_Id);
|
||||
-- The subprogram specification yields the signature of an implicit
|
||||
-- type, whose Ekind is Access_Subprogram_Type. This implicit type is
|
||||
-- the designated type of the declared access type. In subprogram calls,
|
||||
-- the signature of the implicit type works like the profile of a regular
|
||||
-- type, whose Ekind is Access_Subprogram_Type. This implicit type is the
|
||||
-- designated type of the declared access type. In subprogram calls, the
|
||||
-- signature of the implicit type works like the profile of a regular
|
||||
-- subprogram.
|
||||
|
||||
procedure Add_Internal_Interface_Entities (Tagged_Type : Entity_Id);
|
||||
@ -94,8 +94,8 @@ package Sem_Ch3 is
|
||||
-- enclosing declaration that generated Ityp.
|
||||
--
|
||||
-- A related mechanism is used during expansion, for itypes created in
|
||||
-- branches of conditionals. See Ensure_Defined in exp_util.
|
||||
-- Could both mechanisms be merged ???
|
||||
-- branches of conditionals. See Ensure_Defined in exp_util. Could both
|
||||
-- mechanisms be merged ???
|
||||
|
||||
procedure Check_Abstract_Overriding (T : Entity_Id);
|
||||
-- Check that all abstract subprograms inherited from T's parent type have
|
||||
@ -126,11 +126,11 @@ package Sem_Ch3 is
|
||||
Parent_Type : Entity_Id;
|
||||
Actual_Subp : Entity_Id := Empty);
|
||||
-- Derive the subprogram Parent_Subp from Parent_Type, and replace the
|
||||
-- subsidiary subtypes with the derived type to build the specification
|
||||
-- of the inherited subprogram (returned in New_Subp). For tagged types,
|
||||
-- the derived subprogram is aliased to that of the actual (in the
|
||||
-- case where Actual_Subp is nonempty) rather than to the corresponding
|
||||
-- subprogram of the parent type.
|
||||
-- subsidiary subtypes with the derived type to build the specification of
|
||||
-- the inherited subprogram (returned in New_Subp). For tagged types, the
|
||||
-- derived subprogram is aliased to that of the actual (in the case where
|
||||
-- Actual_Subp is nonempty) rather than to the corresponding subprogram of
|
||||
-- the parent type.
|
||||
|
||||
procedure Derive_Subprograms
|
||||
(Parent_Type : Entity_Id;
|
||||
@ -183,10 +183,10 @@ package Sem_Ch3 is
|
||||
(C : Entity_Id;
|
||||
N : Node_Id := Empty) return Boolean;
|
||||
-- Determines if a record component C is visible in the present context.
|
||||
-- Note that even though component C could appear in the entity chain
|
||||
-- of a record type, C may not be visible in the current context. For
|
||||
-- instance, C may be a component inherited in the full view of a private
|
||||
-- extension which is not visible in the current context.
|
||||
-- Note that even though component C could appear in the entity chain of a
|
||||
-- record type, C may not be visible in the current context. For instance,
|
||||
-- C may be a component inherited in the full view of a private extension
|
||||
-- which is not visible in the current context.
|
||||
--
|
||||
-- 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,
|
||||
@ -199,9 +199,9 @@ package Sem_Ch3 is
|
||||
Suffix_Index : Nat := 1;
|
||||
In_Iter_Schm : Boolean := False);
|
||||
-- Process an index that is given in an array declaration, an entry
|
||||
-- family declaration or a loop iteration. The index is given by an
|
||||
-- index declaration (a 'box'), or by a discrete range. The later can
|
||||
-- be the name of a discrete type, or a subtype indication.
|
||||
-- family declaration or a loop iteration. The index is given by an index
|
||||
-- declaration (a 'box'), or by a discrete range. The later can be the name
|
||||
-- of a discrete type, or a subtype indication.
|
||||
--
|
||||
-- Related_Nod is the node where the potential generated implicit types
|
||||
-- will be inserted. The next last parameters are used for creating the
|
||||
@ -257,9 +257,9 @@ package Sem_Ch3 is
|
||||
-- primitive operations of the private view (in the tagged case).
|
||||
-- N is the N_Full_Type_Declaration node.
|
||||
--
|
||||
-- Full_T is the full view of the type whose full declaration is in N.
|
||||
-- Full_T is the full view of the type whose full declaration is in N.
|
||||
--
|
||||
-- Priv_T is the private view of the type whose full declaration is in N.
|
||||
-- Priv_T is the private view of the type whose full declaration is in N.
|
||||
|
||||
procedure Process_Range_Expr_In_Decl
|
||||
(R : Node_Id;
|
||||
@ -298,12 +298,12 @@ package Sem_Ch3 is
|
||||
(N : Node_Id;
|
||||
Prev : Entity_Id := Empty);
|
||||
-- Process the discriminants contained in an N_Full_Type_Declaration or
|
||||
-- N_Incomplete_Type_Decl node N. If the declaration is a completion,
|
||||
-- Prev is entity on the partial view, on which references are posted.
|
||||
-- However, note that Process_Discriminants is called for a completion only
|
||||
-- if partial view had no discriminants (else we just check conformance
|
||||
-- between the two views and do not call Process_Discriminants again for
|
||||
-- the completion).
|
||||
-- N_Incomplete_Type_Decl node N. If the declaration is a completion, Prev
|
||||
-- is entity on the partial view, on which references are posted. However,
|
||||
-- note that Process_Discriminants is called for a completion only if
|
||||
-- partial view had no discriminants (else we just check conformance
|
||||
-- between the two views and do not call Process_Discriminants again
|
||||
-- for the completion).
|
||||
|
||||
function Replace_Anonymous_Access_To_Protected_Subprogram
|
||||
(N : Node_Id) return Entity_Id;
|
||||
|
Loading…
Reference in New Issue
Block a user