Commit 4e0d20ca by Bob Duff Committed by Arnaud Charlet

gnat_ugn.texi, [...]: Add missing documentation for warnings flags.

2009-05-06  Bob Duff  <duff@adacore.com>

	* gnat_ugn.texi, gnat_rm.texi: Add missing documentation for warnings
	flags.

From-SVN: r147161
parent 11795185
2009-05-06 Bob Duff <duff@adacore.com>
* gnat_ugn.texi, gnat_rm.texi: Add missing documentation for warnings
flags.
2009-05-06 Javier Miranda <miranda@adacore.com> 2009-05-06 Javier Miranda <miranda@adacore.com>
* sem_aggr.adb (Valid_Ancestor_Type): Add support for C++ constructors. * sem_aggr.adb (Valid_Ancestor_Type): Add support for C++ constructors.
......
...@@ -5147,6 +5147,8 @@ A turn off all optional warnings ...@@ -5147,6 +5147,8 @@ A turn off all optional warnings
.A turn off warnings for failing assertions .A turn off warnings for failing assertions
b turn on warnings for bad fixed value (not multiple of small) b turn on warnings for bad fixed value (not multiple of small)
B* turn off warnings for bad fixed value (not multiple of small) B* turn off warnings for bad fixed value (not multiple of small)
.b* turn on warnings for biased representation
.B turn off warnings for biased representation
c turn on warnings for constant conditional c turn on warnings for constant conditional
C* turn off warnings for constant conditional C* turn off warnings for constant conditional
.c turn on warnings for unrepped components .c turn on warnings for unrepped components
...@@ -5154,6 +5156,7 @@ C* turn off warnings for constant conditional ...@@ -5154,6 +5156,7 @@ C* turn off warnings for constant conditional
d turn on warnings for implicit dereference d turn on warnings for implicit dereference
D* turn off warnings for implicit dereference D* turn off warnings for implicit dereference
e treat all warnings as errors e treat all warnings as errors
.e turn on every optional warning
f turn on warnings for unreferenced formal f turn on warnings for unreferenced formal
F* turn off warnings for unreferenced formal F* turn off warnings for unreferenced formal
g* turn on warnings for unrecognized pragma g* turn on warnings for unrecognized pragma
...@@ -5177,6 +5180,8 @@ O turn off warnings for address clause overlay ...@@ -5177,6 +5180,8 @@ O turn off warnings for address clause overlay
.O* turn off warnings for out parameters assigned but not read .O* turn off warnings for out parameters assigned but not read
p turn on warnings for ineffective pragma Inline in frontend p turn on warnings for ineffective pragma Inline in frontend
P* turn off warnings for ineffective pragma Inline in frontend P* turn off warnings for ineffective pragma Inline in frontend
.p turn on warnings for parameter ordering
.P* turn off warnings for parameter ordering
q* turn on warnings for questionable missing parentheses q* turn on warnings for questionable missing parentheses
Q turn off warnings for questionable missing parentheses Q turn off warnings for questionable missing parentheses
r turn on warnings for redundant construct r turn on warnings for redundant construct
...@@ -5192,6 +5197,8 @@ v* turn on warnings for unassigned variable ...@@ -5192,6 +5197,8 @@ v* turn on warnings for unassigned variable
V turn off warnings for unassigned variable V turn off warnings for unassigned variable
w* turn on warnings for wrong low bound assumption w* turn on warnings for wrong low bound assumption
W turn off warnings for wrong low bound assumption W turn off warnings for wrong low bound assumption
.w turn on warnings for unnecessary Warnings Off pragmas
.W* turn off warnings for unnecessary Warnings Off pragmas
x* turn on warnings for export/import x* turn on warnings for export/import
X turn off warnings for export/import X turn off warnings for export/import
.x turn on warnings for non-local exceptions .x turn on warnings for non-local exceptions
......
...@@ -3345,11 +3345,12 @@ In this case the components DT inherited from the C++ side must be ...@@ -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 initialized by a C++ constructor, and the additional Ada components
of type DT are initialized by GNAT. The initialization of such an 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 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 @smallexample @c ada
Obj5 : DT; Obj5 : DT;
Obj6 : DT := Function_Returning_DT (50); Obj6 : DT := Function_Returning_DT (50);
Obj7 : DT := (Constructor (30,40) with C_Value => 50);
@end smallexample @end smallexample
The declaration of @code{Obj5} invokes the default constructors: the The declaration of @code{Obj5} invokes the default constructors: the
...@@ -3381,7 +3382,7 @@ non-default C++ constructors specified for the imported components. ...@@ -3381,7 +3382,7 @@ non-default C++ constructors specified for the imported components.
For example: For example:
@smallexample @c ada @smallexample @c ada
Obj7 : Rec2 (40); Obj8 : Rec2 (40);
@end smallexample @end smallexample
Using Ada 2005 we can use limited aggregates to initialize an object 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 ...@@ -3389,13 +3390,13 @@ invoking C++ constructors that differ from those specified in the type
declarations. For example: declarations. For example:
@smallexample @c ada @smallexample @c ada
Obj8 : Rec2 := (Rec => (Data1 => Constructor (15, 16), Obj9 : Rec2 := (Rec => (Data1 => Constructor (15, 16),
others => <>), others => <>),
others => <>); others => <>);
@end smallexample @end smallexample
The above declaration uses an Ada 2005 limited aggregate to 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 arguments is invoked to initialize the @code{Data1} component instead
of the constructor specified in the declaration of type @code{Rec1}. In of the constructor specified in the declaration of type @code{Rec1}. In
Ada 2005 the box in the aggregate indicates that unspecified components 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. ...@@ -5489,6 +5490,20 @@ The default is that warnings for redundant constructs are not given.
@cindex @option{-gnatwR} (@command{gcc}) @cindex @option{-gnatwR} (@command{gcc})
This switch suppresses warnings for redundant constructs. 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 @item -gnatws
@emph{Suppress all warnings.} @emph{Suppress all warnings.}
@cindex @option{-gnatws} (@command{gcc}) @cindex @option{-gnatws} (@command{gcc})
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