gnat_ugn.texi, [...]: Add missing documentation for warnings flags.
[gcc.git] / gcc / ada / gnat_ugn.texi
index 78fee6ac095e09369eb4adc1083214ae90c33286..3cf58680c6b888c27fcb6c321413b6788a7f9eb1 100644 (file)
@@ -3345,11 +3345,12 @@ In this case the components DT inherited from the C++ side must be
 initialized by a C++ constructor, and the additional Ada components
 of type DT are initialized by GNAT. The initialization of such an
 object is done either by default, or by means of a function returning
-an aggregate of type DT.
+an aggregate of type DT, or by means of an extended aggregate.
 
 @smallexample @c ada
   Obj5 : DT;
   Obj6 : DT := Function_Returning_DT (50);
+  Obj7 : DT := (Constructor (30,40) with C_Value => 50);
 @end smallexample
 
 The declaration of @code{Obj5} invokes the default constructors: the
@@ -3381,7 +3382,7 @@ non-default C++ constructors specified for the imported components.
 For example:
 
 @smallexample @c ada
-  Obj7 : Rec2 (40);
+  Obj8 : Rec2 (40);
 @end smallexample
 
 Using Ada 2005 we can use limited aggregates to initialize an object
@@ -3389,13 +3390,13 @@ invoking C++ constructors that differ from those specified in the type
 declarations. For example:
 
 @smallexample @c ada
-  Obj8 : Rec2 := (Rec => (Data1 => Constructor (15, 16),
+  Obj9 : Rec2 := (Rec => (Data1 => Constructor (15, 16),
                           others => <>),
                   others => <>);
 @end smallexample
 
 The above declaration uses an Ada 2005 limited aggregate to
-initialize @code{Obj8}, and the C++ constructor that has two integer
+initialize @code{Obj9}, and the C++ constructor that has two integer
 arguments is invoked to initialize the @code{Data1} component instead
 of the constructor specified in the declaration of type @code{Rec1}. In
 Ada 2005 the box in the aggregate indicates that unspecified components
@@ -5489,6 +5490,20 @@ The default is that warnings for redundant constructs are not given.
 @cindex @option{-gnatwR} (@command{gcc})
 This switch suppresses warnings for redundant constructs.
 
+@item -gnatw.r
+@emph{Activate warnings for object renaming function.}
+@cindex @option{-gnatw.r} (@command{gcc})
+This switch activates warnings for an object renaming that renames a
+function call, which is equivalent to a constant declaration (as
+opposed to renaming the function itself).  The default is that these
+warnings are given.  This warning can also be turned on using
+@option{-gnatwa}.
+
+@item -gnatw.R
+@emph{Suppress warnings for object renaming function.}
+@cindex @option{-gnatwT} (@command{gcc})
+This switch suppresses warnings for object renaming function.
+
 @item -gnatws
 @emph{Suppress all warnings.}
 @cindex @option{-gnatws} (@command{gcc})