+2014-02-25 Arnaud Charlet <charlet@adacore.com>
+
+ * usage.adb (Usage): Add help on -gnateC.
+ * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
+ * opt.ads (Generate_CodePeer_Messages): New flag.
+ * gnat_ugn.texi: Document new switch -gnateC.
+
+2014-02-25 Ben Brosgol <brosgol@adacore.com>
+
+ * gnat_rm.texi: Corrected minor typos in Implementation Defined
+ Aspects.
+ * opt.ads: Minor reformatting.
+
2014-02-25 Robert Dewar <dewar@adacore.com>
* binde.adb: Change messages to mention -gnatel instead of -gnatwl.
@node Implementation Defined Aspects
@chapter Implementation Defined Aspects
Ada defines (throughout the Ada 2012 reference manual, summarized
-in annex K) a set of aspects that can be specified for certain entities.
+in Annex K) a set of aspects that can be specified for certain entities.
These language defined aspects are implemented in GNAT in Ada 2012 mode
and work as described in the Ada 2012 Reference Manual.
In addition, Ada 2012 allows implementations to define additional aspects
whose meaning is defined by the implementation. GNAT provides
-a number of these implementation-dependent aspects which can be used
+a number of these implementation-defined aspects which can be used
to extend and enhance the functionality of the compiler. This section of
-the GNAT reference manual describes these additional attributes.
+the GNAT reference manual describes these additional aspects.
Note that any program using these aspects may not be portable to
other compilers (although GNAT implements this set of aspects on all
@end smallexample
@noindent
-In the documentation sections that follow, such cases are simply marked
+In the documentation below, such cases are simply marked
as being equivalent to the corresponding pragma or attribute definition
clause.
@noindent
This aspect is equivalent to pragma @code{Depends}.
-* Dimension::
-
@node Aspect Dimension
@unnumberedsec Aspect Dimension
@findex Dimension
corresponds to one particular dimension. A maximum of 7 dimensions may
be specified. @code{Unit_Name} is the name of the dimension (for example
@code{Meter}). @code{Unit_Symbol} is the shorthand used for quantities
-of this dimension (for example 'm' for Meter). @code{Dim_Symbol} gives
+of this dimension (for example @code{m} for @code{Meter}).
+@code{Dim_Symbol} gives
the identification within the dimension system (typically this is a
-single letter, e.g. 'L' standing for length for unit name Meter). The
-Unit_Smbol is used in formatted output of dimensioned quantities. The
-Dim_Symbol is used in error messages when numeric operations have
+single letter, e.g. @code{L} standing for length for unit name @code{Meter}).
+The @code{Unit_Symbol} is used in formatted output of dimensioned quantities.
+The @code{Dim_Symbol} is used in error messages when numeric operations have
inconsistent dimensions.
GNAT provides the standard definition of the International MKS system in
@end smallexample
@noindent
-See section "Performing Dimensionality Analysis in GNAT" in the GNAT Users
+See section ``Performing Dimensionality Analysis in GNAT'' in the GNAT Users
Guide for detailed examples of use of the dimension system.
@node Aspect Favor_Top_Level
where the first argument is @code{ON} or @code{OFF} and the second argument
is the entity.
+
@node Implementation Defined Attributes
@chapter Implementation Defined Attributes
Ada defines (throughout the Ada reference manual,
@item -gnatC
@cindex @option{-gnatC} (@command{gcc})
-Generate CodePeer information (no code generation attempted).
+Generate CodePeer intermediate format (no code generation attempted).
This switch will generate an intermediate representation suitable for
use by CodePeer (@file{.scil} files). This switch is not compatible with
code generation (it will, among other things, disable some switches such
@end ifclear
(@pxref{The Configuration Pragmas Files}).
+@item -gnateC
+@cindex @option{-gnateC} (@command{gcc})
+Generate CodePeer messages in a compiler-like format. This switch is only
+effective if @option{-gnatcC} is also specified and requires an installation
+of CodePeer.
+
@item ^-gnated^/DISABLE_ATOMIC_SYNCHRONIZATION^
@cindex @option{-gnated} (@command{gcc})
Disable atomic synchronization
CodePeer_Mode : Boolean := False;
-- GNAT, GNATBIND, GPRBUILD
-- Enable full CodePeer mode (SCIL generation, disable switches that
- -- interact badly with it, etc...).
+ -- interact badly with it, etc...). This is turned on by -gnatC.
Commands_To_Stdout : Boolean := False;
-- GNATMAKE
-- the name is of the form .xxx, then to name.xxx where name is the source
-- file name with extension stripped.
+ Generate_CodePeer_Messages : Boolean := False;
+ -- GNAT
+ -- Generate CodePeer messages. Ignored if CodePeer_Mode is false.
+ -- This is turned on by -gnateC.
+
Generate_Processed_File : Boolean := False;
-- GNAT
-- True when switch -gnateG is used. When True, create in a file
return;
- -- -gnateC switch (CodePeer SCIL generation)
+ -- -gnateC switch (generate CodePeer messages)
- -- Not enabled for now, keep it for later???
- -- use -gnatd.I only for now
-
- -- when 'C' =>
- -- Ptr := Ptr + 1;
- -- Generate_SCIL := True;
+ when 'C' =>
+ Ptr := Ptr + 1;
+ Generate_CodePeer_Messages := True;
-- -gnated switch (disable atomic synchronization)
-- Line for -gnatC switch
Write_Switch_Char ("C");
- Write_Line ("Generate CodePeer information (no code generation)");
+ Write_Line ("Generate CodePeer intermediate format (no code generation)");
-- Line for -gnatd switch
Write_Switch_Char ("ec=?");
Write_Line ("Specify configuration pragmas file, e.g. -gnatec=/x/f.adc");
+ -- Line for -gnateC switch
+
+ Write_Switch_Char ("eC");
+ Write_Line ("Generate CodePeer messages (ignored without -gnatcC)");
+
-- Line for -gnated switch
Write_Switch_Char ("ed");