summaryrefslogtreecommitdiff
path: root/gcc/ada/lib-writ.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-15 10:15:49 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-15 10:15:49 +0000
commit7734e2ae0892bba59fb23fc710122dbca4ff590d (patch)
treeb323f92ac5c08a17d70389e07bf81bf543063039 /gcc/ada/lib-writ.ads
parent1c274529fc9415135a0e7895cea8389ecc9bb30b (diff)
downloadgcc-7734e2ae0892bba59fb23fc710122dbca4ff590d.tar.gz
2009-07-15 Sergey Rybin <rybin@adacore.com>
* tree_in.ads, output.adb, tree_io.ads: Get rid of pragmas Warnings Off/On for with clause to System.OS_Lib - not needed any more. 2009-07-15 Ed Schonberg <schonberg@adacore.com> * sem_warn.adb (Warn_On_Constant_Condition): if the constant condition is a literal of a derived boolean type, it appears as an unchecked conversion. Retrieve actual value from expression of conversion. 2009-07-15 Robert Dewar <dewar@adacore.com> * sem_ch3.adb: Minor reformatting * lib-xref.ads, lib-xref.adb, lib.ads, par_sco.ads, par_sco.adb, lib-writ.ads, lib-writ.adb: Minor reformatting. Fix problem with SCO format in ALI files git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149674 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/lib-writ.ads')
-rw-r--r--gcc/ada/lib-writ.ads552
1 files changed, 269 insertions, 283 deletions
diff --git a/gcc/ada/lib-writ.ads b/gcc/ada/lib-writ.ads
index 2195f0541a8..5a15fd302df 100644
--- a/gcc/ada/lib-writ.ads
+++ b/gcc/ada/lib-writ.ads
@@ -31,15 +31,15 @@ package Lib.Writ is
-- Format of Library Information --
-----------------------------------
- -- This section describes the format of the library information that is
+ -- This section describes the format of the library information that is
-- associated with object files. The exact method of this association is
- -- potentially implementation dependent and is described and implemented
- -- in package ali. From the point of view of the description here, all we
- -- need to know is that the information is represented as a string of
- -- characters that is somehow associated with an object file, and can be
- -- retrieved. If no library information exists for a given object file,
- -- then we take this as equivalent to the non-existence of the object
- -- file, as if source file has not been previously compiled.
+ -- potentially implementation dependent and is described and implemented in
+ -- package ali. From the point of view of the description here, all we need
+ -- to know is that the information is represented as a string of characters
+ -- that is somehow associated with an object file, and can be retrieved. If
+ -- no library information exists for a given object file, then we take this
+ -- as equivalent to the non-existence of the object file, as if source file
+ -- has not been previously compiled.
-- The library information is written as a series of lines of the form:
@@ -51,49 +51,48 @@ package Lib.Writ is
-- Making Changes to the ALI Format --
--------------------------------------
- -- A number of tools use ali.adb to parse ali files. This means
- -- that changes to this format can cause old versions of these tools
- -- to be incompatible with new versions of the compiler. Any changes
- -- to ali file formats must be carefully evaluated to understand any
- -- such possible conflicts, and in particular, it is very undesirable
- -- to create conflicts between older versions of GPS and newer versions
- -- of the compiler.
+ -- A number of tools use ali.adb to parse ali files. This means that
+ -- changes to this format can cause old versions of these tools to be
+ -- incompatible with new versions of the compiler. Any changes to ali file
+ -- formats must be carefully evaluated to understand any such possible
+ -- conflicts, and in particular, it is very undesirable to create conflicts
+ -- between older versions of GPS and newer versions of the compiler.
-- If the following guidelines are respected, downward compatibility
-- problems (old tools reading new ali files) should be minimized:
-- The basic key character format must be kept
- -- The V line must be the first line, this is checked by ali.adb
- -- even in Ignore_Errors mode, and is used to verify that the file
- -- at hand is indeed likely intended to be an ali file.
+ -- The V line must be the first line, this is checked by ali.adb even in
+ -- Ignore_Errors mode, and is used to verify that the file at hand is
+ -- indeed likely intended to be an ali file.
-- The P line must be present, though may be modified in contents
- -- according to remaining guidelines. Again, ali.adb assumes the
- -- P line is present even in Ignore_Errors mode.
+ -- according to remaining guidelines. Again, ali.adb assumes the P
+ -- line is present even in Ignore_Errors mode.
- -- New modifiers can generally be added (in particular adding new
- -- two letter modifiers to the P or U lines is always safe)
+ -- New modifiers can generally be added (in particular adding new two
+ -- letter modifiers to the P or U lines is always safe)
- -- Adding entirely new lines (with a new key letter) to the ali
- -- file is always safe, at any point (other than before the V
- -- line), since such lines will be ignored.
+ -- Adding entirely new lines (with a new key letter) to the ali file is
+ -- always safe, at any point (other than before the V line), since such
+ -- lines will be ignored.
- -- Following the guidelines in this section should ensure that this
- -- problem is minimized and that old tools will be able to deal
- -- successfully with new ali formats. Note that this does not apply
- -- to the compiler itself, which always requires consistency between
- -- the ali files and the binder. That is because one of the main
- -- functions of the binder is to ensure consistency of the partition,
- -- and this can be compromised if the ali files are inconsistent.
+ -- Following the guidelines in this section should ensure that this problem
+ -- is minimized and that old tools will be able to deal successfully with
+ -- new ali formats. Note that this does not apply to the compiler itself,
+ -- which always requires consistency between the ali files and the binder.
+ -- That is because one of the main functions of the binder is to ensure
+ -- consistency of the partition, and this can be compromised if the ali
+ -- files are inconsistent.
------------------
-- Header Lines --
------------------
-- The initial header lines in the file give information about the
- -- compilation environment, and identify other special information
- -- such as main program parameters.
+ -- compilation environment, and identify other special information such as
+ -- main program parameters.
-- ----------------
-- -- V Version --
@@ -104,10 +103,10 @@ package Lib.Writ is
-- This line indicates the library output version, as defined in
-- Gnatvsn. It ensures that separate object modules of a program are
-- consistent. It has to be changed if anything changes which would
- -- affect successful binding of separately compiled modules.
- -- Examples of such changes are modifications in the format of the
- -- library info described in this package, or modifications to
- -- calling sequences, or to the way that data is represented.
+ -- affect successful binding of separately compiled modules. Examples
+ -- of such changes are modifications in the format of the library info
+ -- described in this package, or modifications to calling sequences, or
+ -- to the way that data is represented.
-- Note: the V line absolutely must be the first line, and no change
-- to the ALI format should change this, since even in Ignore_Errors
@@ -119,8 +118,8 @@ package Lib.Writ is
-- M type [priority] [T=time-slice] W=?
- -- This line appears only if the main unit for this file is
- -- suitable for use as a main program. The parameters are:
+ -- This line appears only if the main unit for this file is suitable
+ -- for use as a main program. The parameters are:
-- type
@@ -131,24 +130,24 @@ package Lib.Writ is
-- priority
-- Present only if there was a valid pragma Priority in the
- -- corresponding unit to set the main task priority. It is
- -- an unsigned decimal integer.
+ -- corresponding unit to set the main task priority. It is an
+ -- unsigned decimal integer.
-- T=time-slice
-- Present only if there was a valid pragma Time_Slice in the
- -- corresponding unit. It is an unsigned decimal integer in
- -- the range 0 .. 10**9 giving the time slice value in units
- -- of milliseconds. The actual significance of this parameter
- -- is target dependent.
+ -- corresponding unit. It is an unsigned decimal integer in the
+ -- range 0 .. 10**9 giving the time slice value in units of
+ -- milliseconds. The actual significance of this parameter is
+ -- target dependent.
-- W=?
- -- This parameter indicates the wide character encoding
- -- method used when compiling the main program file. The ?
- -- character is the single character used in the -gnatW?
- -- switch. This is used to provide the default wide-character
- -- encoding for Wide_Text_IO files.
+ -- This parameter indicates the wide character encoding method used
+ -- when compiling the main program file. The ? character is the
+ -- single character used in the -gnatW? switch. This is used to
+ -- provide the default wide-character encoding for Wide_Text_IO
+ -- files.
-- -----------------
-- -- A Argument --
@@ -156,9 +155,9 @@ package Lib.Writ is
-- A argument
- -- One of these lines appears for each of the arguments present
- -- in the call to the gnat1 program. This can be used if it is
- -- necessary to reconstruct this call (e.g. for fix and continue)
+ -- One of these lines appears for each of the arguments present in the
+ -- call to the gnat1 program. This can be used if it is necessary to
+ -- reconstruct this call (e.g. for fix and continue)
-- -------------------
-- -- P Parameters --
@@ -166,44 +165,44 @@ package Lib.Writ is
-- P <<parameters>>
- -- Indicates various information that applies to the compilation
- -- of the corresponding source file. Parameters is a sequence of
- -- zero or more two letter codes that indicate configuration
- -- pragmas and other parameters that apply:
+ -- Indicates various information that applies to the compilation of the
+ -- corresponding source file. Parameters is a sequence of zero or more
+ -- two letter codes that indicate configuration pragmas and other
+ -- parameters that apply:
--
-- The arguments are as follows:
--
- -- CE Compilation errors. If this is present it means that the
- -- ali file resulted from a compilation with the -gnatQ
- -- switch set, and illegalities were detected. The ali
- -- file contents may not be completely reliable, but the
- -- format will be correct and complete. Note that NO is
- -- always present if CE is present.
+ -- CE Compilation errors. If this is present it means that the ali
+ -- file resulted from a compilation with the -gnatQ switch set,
+ -- and illegalities were detected. The ali file contents may
+ -- not be completely reliable, but the format will be correct
+ -- and complete. Note that NO is always present if CE is
+ -- present.
--
- -- DB Detect_Blocking pragma is in effect for all units in
- -- this file.
+ -- DB Detect_Blocking pragma is in effect for all units in this
+ -- file.
--
- -- FD Configuration pragmas apply to all the units in this
- -- file specifying a possibly non-standard floating point
- -- format (VAX float with Long_Float using D_Float)
+ -- FD Configuration pragmas apply to all the units in this file
+ -- specifying a possibly non-standard floating point format
+ -- (VAX float with Long_Float using D_Float).
--
- -- FG Configuration pragmas apply to all the units in this
- -- file specifying a possibly non-standard floating point
- -- format (VAX float with Long_Float using G_Float)
+ -- FG Configuration pragmas apply to all the units in this file
+ -- specifying a possibly non-standard floating point format
+ -- (VAX float with Long_Float using G_Float).
--
- -- FI Configuration pragmas apply to all the units in this
- -- file specifying a possibly non-standard floating point
- -- format (IEEE Float)
+ -- FI Configuration pragmas apply to all the units in this file
+ -- specifying a possibly non-standard floating point format
+ -- (IEEE Float).
--
- -- Lx A valid Locking_Policy pragma applies to all the units
- -- in this file, where x is the first character (upper case)
- -- of the policy name (e.g. 'C' for Ceiling_Locking)
+ -- Lx A valid Locking_Policy pragma applies to all the units in
+ -- this file, where x is the first character (upper case) of
+ -- the policy name (e.g. 'C' for Ceiling_Locking).
--
- -- NO No object. This flag indicates that the units in this
- -- file were not compiled to produce an object. This can
- -- occur as a result of the use of -gnatc, or if no object
- -- can be produced (e.g. when a package spec is compiled
- -- instead of the body, or a subunit on its own).
+ -- NO No object. This flag indicates that the units in this file
+ -- were not compiled to produce an object. This can occur as a
+ -- result of the use of -gnatc, or if no object can be produced
+ -- (e.g. when a package spec is compiled instead of the body,
+ -- or a subunit on its own).
--
-- NR No_Run_Time. Indicates that a pragma No_Run_Time applies
-- to all units in the file.
@@ -241,9 +240,9 @@ package Lib.Writ is
-- possible cases. These values are checked for consistency by the
-- binder and then copied to the generated binder output file.
- -- Note: The P line must be present. Even in Ignore_Errors mode,
- -- Scan_ALI insists on finding a P line. So if changes are made to
- -- the ALI format, they should not include removing the P line!
+ -- Note: The P line must be present. Even in Ignore_Errors mode, Scan_ALI
+ -- insists on finding a P line. So if changes are made to the ALI format,
+ -- they should not include removing the P line!
-- ---------------------
-- -- R Restrictions --
@@ -257,61 +256,58 @@ package Lib.Writ is
-- R <<restriction-characters>> <<restriction-param-id-entries>>
-- The first parameter is a string of characters that records
- -- information regarding restrictions that do not take parameter
- -- not take parameter values. It is a string of characters, one
- -- character for each value (in order) in All_Boolean_Restrictions.
- -- There are three possible settings for each restriction:
+ -- information regarding restrictions that do not take parameter not
+ -- take parameter values. It is a string of characters, one character
+ -- for each value (in order) in All_Boolean_Restrictions. There are
+ -- three possible settings for each restriction:
-- r Restricted. Unit was compiled under control of a pragma
- -- Restrictions for the corresponding restriction. In
- -- this case the unit certainly does not violate the
- -- Restriction, since this would have been detected by
- -- the compiler.
+ -- Restrictions for the corresponding restriction. In this case
+ -- the unit certainly does not violate the Restriction, since
+ -- this would have been detected by the compiler.
- -- n Not used. The unit was not compiled under control of a
- -- pragma Restrictions for the corresponding restriction,
- -- and does not make any use of the referenced feature.
+ -- n Not used. The unit was not compiled under control of a pragma
+ -- Restrictions for the corresponding restriction, and does not
+ -- make any use of the referenced feature.
- -- v Violated. The unit was not compiled under control of a
- -- pragma Restrictions for the corresponding restriction,
- -- and it does indeed use the referenced feature.
+ -- v Violated. The unit was not compiled under control of a pragma
+ -- Restrictions for the corresponding restriction, and it does
+ -- indeed use the referenced feature.
- -- This information is used in the binder to check consistency,
- -- i.e. to detect cases where one unit has "r" and another unit
- -- has "v", which is not permitted, since these restrictions
- -- are partition-wide.
+ -- This information is used in the binder to check consistency, i.e. to
+ -- detect cases where one unit has "r" and another unit has "v", which
+ -- is not permitted, since these restrictions are partition-wide.
- -- The second parameter, which immediately follows the first (with
- -- no separating space) gives restriction information for identifiers
- -- for which a parameter is given.
+ -- The second parameter, which immediately follows the first (with no
+ -- separating space) gives restriction information for identifiers for
+ -- which a parameter is given.
-- The parameter is a string of entries, one for each value in
- -- Restrict.All_Parameter_Restrictions. Each entry has two
- -- components in sequence, the first indicating whether or not
- -- there is a restriction, and the second indicating whether
- -- or not the compiler detected violations. In the boolean case
- -- it is not necessary to separate these, since if a restriction
- -- is set, and violated, that is an error. But in the parameter
- -- case, this is not true. For example, we can have a unit with
- -- a pragma Restrictions (Max_Tasks => 4), where the compiler
- -- can detect that there are exactly three tasks declared. Both
- -- of these pieces of information must be passed to the binder.
- -- The parameter of 4 is important in case the total number of
- -- tasks in the partition is greater than 4. The parameter of
- -- 3 is important in case some other unit has a restrictions
- -- pragma with Max_Tasks=>2.
+ -- Restrict.All_Parameter_Restrictions. Each entry has two components
+ -- in sequence, the first indicating whether or not there is a
+ -- restriction, and the second indicating whether or not the compiler
+ -- detected violations. In the boolean case it is not necessary to
+ -- separate these, since if a restriction is set, and violated, that is
+ -- an error. But in the parameter case, this is not true. For example,
+ -- we can have a unit with a pragma Restrictions (Max_Tasks => 4),
+ -- where the compiler can detect that there are exactly three tasks
+ -- declared. Both of these pieces of information must be passed to the
+ -- binder. The parameter of 4 is important in case the total number of
+ -- tasks in the partition is greater than 4. The parameter of 3 is
+ -- important in case some other unit has a restrictions pragma with
+ -- Max_Tasks=>2.
-- The component for the presence of restriction has one of two
-- possible forms:
- -- n No pragma for this restriction is present in the
- -- set of units for this ali file.
+ -- n No pragma for this restriction is present in the set of units
+ -- for this ali file.
- -- rN At least one pragma for this restriction is present
- -- in the set of units for this ali file. The value N
- -- is the minimum parameter value encountered in any
- -- such pragma. N is in the range of Integer (a value
- -- larger than N'Last causes the pragma to be ignored).
+ -- rN At least one pragma for this restriction is present in the
+ -- set of units for this ali file. The value N is the minimum
+ -- parameter value encountered in any such pragma. N is in the
+ -- range of Integer (a value larger than N'Last causes the
+ -- pragma to be ignored).
-- The component for the violation detection has one of three
-- possible forms:
@@ -319,12 +315,12 @@ package Lib.Writ is
-- n No violations were detected by the compiler
-- vN A violation was detected. N is either the maximum or total
- -- count of violations (depending on the checking type) in
- -- all the units represented by the ali file). Note that
- -- this setting is only allowed for restrictions that are
- -- in Checked_[Max|Sum]_Parameter_Restrictions. The value
- -- here is known to be exact by the compiler and is in the
- -- range of Natural.
+ -- count of violations (depending on the checking type) in all
+ -- the units represented by the ali file). Note that this
+ -- setting is only allowed for restrictions that are in
+ -- Checked_[Max|Sum]_Parameter_Restrictions. The value here is
+ -- known to be exact by the compiler and is in the range of
+ -- Natural.
-- vN+ A violation was detected. The compiler cannot determine
-- the exact count of violations, but it is at least N.
@@ -354,18 +350,18 @@ package Lib.Writ is
-- I interrupt-number interrupt-state line-number
- -- This line records information from an Interrupt_State pragma.
- -- There is one line for each separate pragma, and if no such
- -- pragmas are used, then no I lines are present.
+ -- This line records information from an Interrupt_State pragma. There
+ -- is one line for each separate pragma, and if no such pragmas are
+ -- used, then no I lines are present.
- -- The interrupt-number is an unsigned positive integer giving
- -- the value of the interrupt as defined in Ada.Interrupts.Names.
+ -- The interrupt-number is an unsigned positive integer giving the
+ -- value of the interrupt as defined in Ada.Interrupts.Names.
-- The interrupt-state is one of r/s/u for Runtime/System/User
- -- The line number is an unsigned decimal integer giving the
- -- line number of the corresponding Interrupt_State pragma.
- -- This is used in consistency messages.
+ -- The line number is an unsigned decimal integer giving the line
+ -- number of the corresponding Interrupt_State pragma. This is used
+ -- in consistency messages.
-- -------------------------------------
-- -- S Priority Specific Dispatching --
@@ -383,23 +379,22 @@ package Lib.Writ is
-- The first_priority and last_priority fields define the range of
-- priorities to which the specified dispatching policy apply.
- -- The line number is an unsigned decimal integer giving the
- -- line number of the corresponding Priority_Specific_Dispatching
- -- pragma. This is used in consistency messages.
+ -- The line number is an unsigned decimal integer giving the line
+ -- number of the corresponding Priority_Specific_Dispatching pragma.
+ -- This is used in consistency messages.
----------------------------
-- Compilation Unit Lines --
----------------------------
-- Following these header lines, a set of information lines appears for
- -- each compilation unit that appears in the corresponding object file.
- -- In particular, when a package body or subprogram body is compiled,
- -- there will be two sets of information, one for the spec and one for
- -- the body, with the entry for the body appearing first. This is the
- -- only case in which a single ALI file contains more than one unit (in
- -- particular note that subunits do *not* count as compilation units for
- -- this purpose, and generate no library information, since they are
- -- inlined).
+ -- each compilation unit that appears in the corresponding object file. In
+ -- particular, when a package body or subprogram body is compiled, there
+ -- will be two sets of information, one for the spec and one for the body,
+ -- with the entry for the body appearing first. This is the only case in
+ -- which a single ALI file contains more than one unit (in particular note
+ -- that subunits do *not* count as compilation units for this purpose, and
+ -- generate no library information, since they are inlined).
-- --------------------
-- -- U Unit Header --
@@ -409,15 +404,14 @@ package Lib.Writ is
-- U unit-name source-name version <<attributes>>
--
- -- This line identifies the unit to which this section of the
- -- library information file applies. The first three parameters are
- -- the unit name in internal format, as described in package Uname,
- -- and the name of the source file containing the unit.
+ -- This line identifies the unit to which this section of the library
+ -- information file applies. The first three parameters are the unit
+ -- name in internal format, as described in package Uname, and the name
+ -- of the source file containing the unit.
--
- -- Version is the version given as eight hexadecimal characters
- -- with upper case letters. This value is the exclusive or of the
- -- source checksums of the unit and all its semantically dependent
- -- units.
+ -- Version is the version given as eight hexadecimal characters with
+ -- upper case letters. This value is the exclusive or of the source
+ -- checksums of the unit and all its semantically dependent units.
--
-- The <<attributes>> are a series of two letter codes indicating
-- information about the unit:
@@ -430,47 +424,47 @@ package Lib.Writ is
-- not promise, to keep the elaboration of the body close to
-- the elaboration of the spec.
--
- -- DE Dynamic Elaboration. This unit was compiled with the
- -- dynamic elaboration model, as set by either the -gnatE
- -- switch or pragma Elaboration_Checks (Dynamic).
+ -- DE Dynamic Elaboration. This unit was compiled with the dynamic
+ -- elaboration model, as set by either the -gnatE switch or
+ -- pragma Elaboration_Checks (Dynamic).
--
- -- EB Unit has pragma Elaborate_Body, or is a generic instance
- -- that has a body. Set for instances because RM 12.3(20)
- -- requires that the body be immediately elaborated after the
- -- spec (we would normally do that anyway, because elaborate
- -- spec and body together whenever possible, and for an instance
- -- it is always possible; however setting EB ensures that this
- -- is done even when using the -p gnatbind switch).
+ -- EB Unit has pragma Elaborate_Body, or is a generic instance that
+ -- has a body. Set for instances because RM 12.3(20) requires
+ -- that the body be immediately elaborated after the spec (we
+ -- would normally do that anyway, because elaborate spec and
+ -- body together whenever possible, and for an instance it is
+ -- always possible; however setting EB ensures that this is done
+ -- even when using the -p gnatbind switch).
--
-- EE Elaboration entity is present which must be set true when
- -- the unit is elaborated. The name of the elaboration entity
- -- is formed from the unit name in the usual way. If EE is
- -- present, then this boolean must be set True as part of the
- -- elaboration processing routine generated by the binder.
- -- Note that EE can be set even if NE is set. This happens
- -- when the boolean is needed solely for checking for the
- -- case of access before elaboration.
+ -- the unit is elaborated. The name of the elaboration entity is
+ -- formed from the unit name in the usual way. If EE is present,
+ -- then this boolean must be set True as part of the elaboration
+ -- processing routine generated by the binder. Note that EE can
+ -- be set even if NE is set. This happens when the boolean is
+ -- needed solely for checking for the case of access before
+ -- elaboration.
--
-- GE Unit is a generic declaration, or corresponding body
--
- -- IL Unit source uses a style with identifiers in all lower
- -- IU case (IL) or all upper case (IU). If the standard mixed-
- -- case usage is detected, or the compiler cannot determine
- -- the style, then no I parameter will appear.
+ -- IL Unit source uses a style with identifiers in all lower-case
+ -- IU (IL) or all upper case (IU). If the standard mixed-case usage
+ -- is detected, or the compiler cannot determine the style, then
+ -- no I parameter will appear.
--
-- IS Initialize_Scalars pragma applies to this unit, or else there
-- is at least one use of the Invalid_Value attribute.
--
- -- KM Unit source uses a style with keywords in mixed case
- -- KU (KM) or all upper case (KU). If the standard lower-case
- -- usage is detected, or the compiler cannot determine the
- -- style, then no K parameter will appear.
+ -- KM Unit source uses a style with keywords in mixed case (KM)
+ -- KU or all upper case (KU). If the standard lower-case usage is
+ -- is detected, or the compiler cannot determine the style, then
+ -- no K parameter will appear.
--
- -- NE Unit has no elaboration routine. All subprogram bodies
- -- and specs are in this category. Package bodies and specs
- -- may or may not have NE set, depending on whether or not
- -- elaboration code is required. Set if N_Compilation_Unit
- -- node has flag Has_No_Elaboration_Code set.
+ -- NE Unit has no elaboration routine. All subprogram bodies and
+ -- specs are in this category. Package bodies and specs may or
+ -- may not have NE set, depending on whether or not elaboration
+ -- code is required. Set if N_Compilation_Unit node has flag
+ -- Has_No_Elaboration_Code set.
--
-- OL The units in this file are compiled with a local pragma
-- Optimize_Alignment, so no consistency requirement applies
@@ -515,10 +509,10 @@ package Lib.Writ is
-- W unit-name [source-name lib-name] [E] [EA] [ED] [AD]
--
- -- One of these lines is present for each unit that is mentioned in
- -- an explicit with clause by the current unit. The first parameter is
- -- the unit name in internal format. The second parameter is the file
- -- name of the file that must be compiled to compile this unit. It is
+ -- One of these lines is present for each unit that is mentioned in an
+ -- explicit with clause by the current unit. The first parameter is the
+ -- unit name in internal format. The second parameter is the file name
+ -- of the file that must be compiled to compile this unit. It is
-- usually the file for the body, except for packages which have no
-- body. For units that need a body, if the source file for the body
-- cannot be found, the file name of the spec is used instead. The
@@ -530,21 +524,20 @@ package Lib.Writ is
--
-- EA pragma Elaborate_All applies to this unit
--
- -- ED Elaborate_Desirable set for this unit, which means
- -- that there is no Elaborate, but the analysis suggests
- -- that Program_Error may be raised if the Elaborate
- -- conditions cannot be satisfied. The binder will attempt
- -- to treat ED as E if it can.
+ -- ED Elaborate_Desirable set for this unit, which means that there
+ -- is no Elaborate, but the analysis suggests that Program_Error
+ -- may be raised if the Elaborate conditions cannot be satisfied.
+ -- The binder will attempt to treat ED as E if it can.
--
- -- AD Elaborate_All_Desirable set for this unit, which means
- -- that there is no Elaborate_All, but the analysis suggests
- -- that Program_Error may be raised if the Elaborate_All
- -- conditions cannot be satisfied. The binder will attempt
- -- to treat AD as EA if it can.
+ -- AD Elaborate_All_Desirable set for this unit, which means that
+ -- there is no Elaborate_All, but the analysis suggests that
+ -- Program_Error may be raised if the Elaborate_All conditions
+ -- cannot be satisfied. The binder will attempt to treat AD as
+ -- EA if it can.
--
- -- The parameter source-name and lib-name are omitted for the case
- -- of a generic unit compiled with earlier versions of GNAT which
- -- did not generate object or ali files for generics.
+ -- The parameter source-name and lib-name are omitted for the case of a
+ -- generic unit compiled with earlier versions of GNAT which did not
+ -- generate object or ali files for generics.
-- In fact W lines include implicit withs ???
@@ -552,11 +545,10 @@ package Lib.Writ is
-- -- L Linker_Options --
-- -----------------------
- -- Following the W lines (if any, or the U line if not), are an
- -- optional series of lines that indicates the usage of the pragma
- -- Linker_Options in the associated unit. For each appearance of a
- -- pragma Linker_Options (or Link_With) in the unit, a line is
- -- present with the form:
+ -- Following the W lines (if any, or the U line if not), are an optional
+ -- series of lines that indicates the usage of the pragma Linker_Options in
+ -- the associated unit. For each appearance of a pragma Linker_Options (or
+ -- Link_With) in the unit, a line is present with the form:
-- L "string"
@@ -570,50 +562,39 @@ package Lib.Writ is
-- to separate multiple arguments of a single
-- Linker_Options pragma.
- -- For further details, see Stringt.Write_String_Table_Entry. Note
- -- that wide characters in the form {hhhh} cannot be produced, since
- -- pragma Linker_Option accepts only String, not Wide_String.
+ -- For further details, see Stringt.Write_String_Table_Entry. Note that
+ -- wide characters in the form {hhhh} cannot be produced, since pragma
+ -- Linker_Option accepts only String, not Wide_String.
-- The L lines are required to appear in the same order as the
- -- corresponding Linker_Options (or Link_With) pragmas appear in
- -- the source file, so that this order is preserved by the binder
- -- in constructing the set of linker arguments.
-
- -- ------------------------------------
- -- -- C Source Coverage Obligations --
- -- -------------------------------------
-
- -- Following the L lines (if any) are the SCO (Source Coverage Obligation)
- -- lines if they are being generated. For the full format of these lines,
- -- see the spec of Par_SCO.
+ -- corresponding Linker_Options (or Link_With) pragmas appear in the
+ -- source file, so that this order is preserved by the binder in
+ -- constructing the set of linker arguments.
---------------------
-- Reference Lines --
---------------------
- -- The reference lines contain information about references from
- -- any of the units in the compilation (including, body version
- -- and version attributes, linker options pragmas and source
- -- dependencies.
+ -- The reference lines contain information about references from any of the
+ -- units in the compilation (including, body version and version
+ -- attributes, linker options pragmas and source dependencies.
-- ------------------------------------
-- -- E External Version References --
-- ------------------------------------
- -- One of these lines is present for each use of 'Body_Version or
- -- 'Version in any of the units of the compilation. These are used
- -- by the linker to determine which version symbols must be output.
- -- The format is simply:
+ -- One of these lines is present for each use of 'Body_Version or 'Version
+ -- in any of the units of the compilation. These are used by the linker to
+ -- determine which version symbols must be output. The format is simply:
-- E name
- -- where name is the external name, i.e. the unit name with either
- -- a S or a B for spec or body version referenced (Body_Version
- -- always references the body, Version references the Spec, except
- -- in the case of a reference to a subprogram with no separate spec).
- -- Upper half and wide character codes are encoded using the same
- -- method as in Namet (Uhh for upper half, Whhhh for wide character,
- -- where hh are hex digits).
+ -- where name is the external name, i.e. the unit name with either a S or a
+ -- B for spec or body version referenced (Body_Version always references
+ -- the body, Version references the Spec, except in the case of a reference
+ -- to a subprogram with no separate spec). Upper half and wide character
+ -- codes are encoded using the same method as in Namet (Uhh for upper half,
+ -- Whhhh for wide character, where hh are hex digits).
-- ---------------------
-- -- D Dependencies --
@@ -625,55 +606,60 @@ package Lib.Writ is
-- D source-name time-stamp checksum [subunit-name] line:file-name
- -- The time-stamp field contains the time stamp of the
- -- corresponding source file. See types.ads for details on
- -- time stamp representation.
+ -- The time-stamp field contains the time stamp of the corresponding
+ -- source file. See types.ads for details on time stamp representation.
- -- The checksum is an 8-hex digit representation of the source
- -- file checksum, with letters given in lower case.
+ -- The checksum is an 8-hex digit representation of the source file
+ -- checksum, with letters given in lower case.
- -- The subunit name is present only if the dependency line is for
- -- a subunit. It contains the fully qualified name of the subunit
- -- in all lower case letters.
+ -- The subunit name is present only if the dependency line is for a
+ -- subunit. It contains the fully qualified name of the subunit in all
+ -- lower case letters.
-- The line:file-name entry is present only if a Source_Reference
- -- pragma appeared in the source file identified by source-name.
- -- In this case, it gives the information from this pragma. Note
- -- that this allows cross-reference information to be related back
- -- to the original file. Note: the reason the line number comes
- -- first is that a leading digit immediately identifies this as
- -- a Source_Reference entry, rather than a subunit-name.
-
- -- A line number of zero for line: in this entry indicates that
- -- there is more than one source reference pragma. In this case,
- -- the line numbers in the cross-reference are correct, and refer
- -- to the original line number, but there is no information that
- -- allows a reader of the ALI file to determine the exact mapping
- -- of physical line numbers back to the original source.
+ -- pragma appeared in the source file identified by source-name. In
+ -- this case, it gives the information from this pragma. Note that this
+ -- allows cross-reference information to be related back to the
+ -- original file. Note: the reason the line number comes first is that
+ -- a leading digit immediately identifies this as a Source_Reference
+ -- entry, rather than a subunit-name.
+
+ -- A line number of zero for line: in this entry indicates that there
+ -- is more than one source reference pragma. In this case, the line
+ -- numbers in the cross-reference are correct, and refer to the
+ -- original line number, but there is no information that allows a
+ -- reader of the ALI file to determine the exact mapping of physical
+ -- line numbers back to the original source.
-- Files with a zero checksum and a non-zero time stamp are in general
-- files on which the compilation depends but which are not Ada files
-- with further dependencies. This includes preprocessor data files
-- and preprocessor definition files.
- -- Note: blank lines are ignored when the library information is
- -- read, and separate sections of the file are separated by blank
- -- lines to ease readability. Blanks between fields are also
- -- ignored.
+ -- Note: blank lines are ignored when the library information is read,
+ -- and separate sections of the file are separated by blank lines to
+ -- ease readability. Blanks between fields are also ignored.
- -- For entries corresponding to files that were not present (and
- -- thus resulted in error messages), or for files that are not
- -- part of the dependency set, both the time stamp and checksum
- -- are set to all zero characters. These dummy entries are ignored
- -- by the binder in dependency checking, but must be present for
- -- proper interpretation of the cross-reference data.
+ -- For entries corresponding to files that were not present (and thus
+ -- resulted in error messages), or for files that are not part of the
+ -- dependency set, both the time stamp and checksum are set to all zero
+ -- characters. These dummy entries are ignored by the binder in
+ -- dependency checking, but must be present for proper interpretation
+ -- of the cross-reference data.
--------------------------
-- Cross-Reference Data --
--------------------------
- -- The cross-reference data follows the dependency lines. See
- -- the spec of Lib.Xref for details on the format of this data.
+ -- The cross-reference data follows the dependency lines. See the spec of
+ -- Lib.Xref for details on the format of this data.
+
+ ---------------------------------
+ -- Source Coverage Obligations --
+ ---------------------------------
+
+ -- The Source Coverage Obligation (SCO) information follows the cross-
+ -- reference data. See the spec of Par_SCO for full details of the format.
----------------------
-- Global_Variables --
@@ -706,9 +692,9 @@ package Lib.Writ is
-- The table structure defined here stores one entry for each
-- Priority_Specific_Dispatching pragma encountered either in the main
- -- source or in an ancillary with'ed source. Since
- -- have to be consistent across all units in a partition, we may
- -- as well detect inconsistencies at compile time when we can.
+ -- source or in an ancillary with'ed source. Since have to be consistent
+ -- across all units in a partition, we may as well detect inconsistencies
+ -- at compile time when we can.
type Specific_Dispatching_Entry is record
Dispatching_Policy : Character;
@@ -739,9 +725,9 @@ package Lib.Writ is
-----------------
procedure Ensure_System_Dependency;
- -- This procedure ensures that a dependency is created on system.ads.
- -- Even if there is no semantic dependency, Targparm has read the
- -- file to acquire target parameters, so we need a source dependency.
+ -- This procedure ensures that a dependency is created on system.ads. Even
+ -- if there is no semantic dependency, Targparm has read the file to
+ -- acquire target parameters, so we need a source dependency.
procedure Write_ALI (Object : Boolean);
-- This procedure writes the library information for the current main unit
@@ -755,7 +741,7 @@ package Lib.Writ is
-- the A lines in this file.
procedure Add_Preprocessing_Dependency (S : Source_File_Index);
- -- Indicate that there is a dependency to be added on a preprocessing
- -- data file or on a preprocessing definition file.
+ -- Indicate that there is a dependency to be added on a preprocessing data
+ -- file or on a preprocessing definition file.
end Lib.Writ;