Commit 1250f802 by Robert Dewar Committed by Arnaud Charlet

sem_warn.adb (Check_Use_Clause): Don't give no entities used msg if errors found.

2014-01-22  Robert Dewar  <dewar@adacore.com>

	* sem_warn.adb (Check_Use_Clause): Don't give no entities used
	msg if errors found.
	(Check_One_Unit): Same change.

2014-01-22  Robert Dewar  <dewar@adacore.com>

	* ug_words: Add missing/wrong entries for VMS warning switches.
	* sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.

From-SVN: r206920
parent 54533a0b
2014-01-22 Robert Dewar <dewar@adacore.com>
* sem_warn.adb (Check_Use_Clause): Don't give no entities used
msg if errors found.
(Check_One_Unit): Same change.
2014-01-22 Robert Dewar <dewar@adacore.com>
* ug_words: Add missing/wrong entries for VMS warning switches.
* sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
2014-01-22 Jerome Guitton <guitton@adacore.com> 2014-01-22 Jerome Guitton <guitton@adacore.com>
* mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
......
...@@ -5339,6 +5339,22 @@ an explicit @option{-gnatws} or ...@@ -5339,6 +5339,22 @@ an explicit @option{-gnatws} or
implicit @option{-gnatwe} that is activated by the implicit @option{-gnatwe} that is activated by the
use of @option{-gnatg}. use of @option{-gnatg}.
@item -gnatw.n
@emph{Activate warnings on atomic synchronization.}
@cindex @option{-gnatw.n} (@command{gcc})
@cindex Atomic Synchronization, warnings
This switch actives warnings when an access to an atomic variable
requires the generation of atomic synchronization code. These
warnings are off by default and this warning is not included
in @code{-gnatwa}.
@item -gnatw.N
@emph{Suppress warnings on atomic synchronization.}
@cindex @option{-gnatw.n} (@command{gcc})
@cindex Atomic Synchronization, warnings
This switch suppresses warnings when an access to an atomic variable
requires the generation of atomic synchronization code.
@item -gnatwo @item -gnatwo
@emph{Activate warnings on address clause overlays.} @emph{Activate warnings on address clause overlays.}
@cindex @option{-gnatwo} (@command{gcc}) @cindex @option{-gnatwo} (@command{gcc})
...@@ -2823,6 +2823,8 @@ package body Sem_Prag is ...@@ -2823,6 +2823,8 @@ package body Sem_Prag is
-- Check if a rep item of the same name as the current pragma is already -- Check if a rep item of the same name as the current pragma is already
-- chained as a rep pragma to the given entity. If so give a message -- chained as a rep pragma to the given entity. If so give a message
-- about the duplicate, and then raise Pragma_Exit so does not return. -- about the duplicate, and then raise Pragma_Exit so does not return.
-- Note that if E is a type, then this routine avoids flagging a pragma
-- which applies to a parent type from which E is derived.
procedure Check_Duplicated_Export_Name (Nam : Node_Id); procedure Check_Duplicated_Export_Name (Nam : Node_Id);
-- Nam is an N_String_Literal node containing the external name set by -- Nam is an N_String_Literal node containing the external name set by
...@@ -3924,6 +3926,36 @@ package body Sem_Prag is ...@@ -3924,6 +3926,36 @@ package body Sem_Prag is
P := Get_Rep_Item (E, Pragma_Name (N), Check_Parents => False); P := Get_Rep_Item (E, Pragma_Name (N), Check_Parents => False);
if Present (P) then if Present (P) then
-- If the entity is a type, then we have to make sure that the
-- ostensible duplicate is not for a parent type from which this
-- type is derived.
if Is_Type (E) then
if Nkind (P) = N_Pragma then
declare
Args : constant List_Id :=
Pragma_Argument_Associations (P);
begin
if Present (Args)
and then Is_Entity_Name (Expression (First (Args)))
and then Is_Type (Entity (Expression (First (Args))))
and then Entity (Expression (First (Args))) /= E
then
return;
end if;
end;
elsif Nkind (P) = N_Aspect_Specification
and then Is_Type (Entity (P))
and then Entity (P) /= E
then
return;
end if;
end if;
-- Here we have a definite duplicate
Error_Msg_Name_1 := Pragma_Name (N); Error_Msg_Name_1 := Pragma_Name (N);
Error_Msg_Sloc := Sloc (P); Error_Msg_Sloc := Sloc (P);
......
...@@ -2130,11 +2130,18 @@ package body Sem_Warn is ...@@ -2130,11 +2130,18 @@ package body Sem_Warn is
Nam := First (Names (N)); Nam := First (Names (N));
while Present (Nam) loop while Present (Nam) loop
if Entity (Nam) = Pack then if Entity (Nam) = Pack then
Error_Msg_Qual_Level := 1;
Error_Msg_NE -- CODEFIX -- Suppress message if any serious errors detected
("?u?no entities of package& are referenced!", -- that turn off expansion, and thus result in false
Nam, Pack); -- positives for this warning.
Error_Msg_Qual_Level := 0;
if Serious_Errors_Detected = 0 then
Error_Msg_Qual_Level := 1;
Error_Msg_NE -- CODEFIX
("?u?no entities of package& are referenced!",
Nam, Pack);
Error_Msg_Qual_Level := 0;
end if;
end if; end if;
Next (Nam); Next (Nam);
...@@ -2402,8 +2409,13 @@ package body Sem_Warn is ...@@ -2402,8 +2409,13 @@ package body Sem_Warn is
-- Else give the warning -- Else give the warning
else else
if not -- Warn if we unreferenced flag set and we have
Has_Unreferenced (Entity (Name (Item))) -- not had serious errors. The reason we inhibit
-- the message if there are errors is to prevent
-- false positives from disabling expansion.
if not Has_Unreferenced (Entity (Name (Item)))
and then Serious_Errors_Detected = 0
then then
Error_Msg_N -- CODEFIX Error_Msg_N -- CODEFIX
("?u?no entities of & are referenced!", ("?u?no entities of & are referenced!",
...@@ -2541,6 +2553,8 @@ package body Sem_Warn is ...@@ -2541,6 +2553,8 @@ package body Sem_Warn is
-- Start of processing for Check_Unused_Withs -- Start of processing for Check_Unused_Withs
begin begin
-- Immediate return if no semantics or warning flag not set
if not Opt.Check_Withs or else Operating_Mode = Check_Syntax then if not Opt.Check_Withs or else Operating_Mode = Check_Syntax then
return; return;
end if; end if;
......
...@@ -160,17 +160,25 @@ gcc -c ^ GNAT COMPILE ...@@ -160,17 +160,25 @@ gcc -c ^ GNAT COMPILE
-gnatw.H ^ /WARNINGS=NOAVOIDGAPS -gnatw.H ^ /WARNINGS=NOAVOIDGAPS
-gnatwi ^ /WARNINGS=IMPLEMENTATION -gnatwi ^ /WARNINGS=IMPLEMENTATION
-gnatwI ^ /WARNINGS=NOIMPLEMENTATION -gnatwI ^ /WARNINGS=NOIMPLEMENTATION
-gnatw.i ^ /WARNINGS=OVERLAPPING_ACTUALS
-gnatw.I ^ /WARNINGS=NOOVERLAPPING_ACTUALS
-gnatwj ^ /WARNINGS=OBSOLESCENT -gnatwj ^ /WARNINGS=OBSOLESCENT
-gnatwJ ^ /WARNINGS=NOOBSOLESCENT -gnatwJ ^ /WARNINGS=NOOBSOLESCENT
-gnatwk ^ /WARNINGS=CONSTANT_VARIABLES -gnatwk ^ /WARNINGS=CONSTANT_VARIABLES
-gnatwK ^ /WARNINGS=NOCONSTANT_VARIABLES -gnatwK ^ /WARNINGS=NOCONSTANT_VARIABLES
-gnatw.k ^ /WARNINGS=STANDARD_REDEFINITION
-gnatw.K ^ /WARNINGS=NOSTANDARD_REDEFINITION
-gnatwl ^ /WARNINGS=ELABORATION -gnatwl ^ /WARNINGS=ELABORATION
-gnatwL ^ /WARNINGS=NOELABORATION -gnatwL ^ /WARNINGS=NOELABORATION
-gnatwl ^ /WARNINGS=INHERITED_ASPECTS
-gnatwL ^ /WARNINGS=NOINHERITED_ASPECTS
-gnatwm ^ /WARNINGS=MODIFIED_UNREF -gnatwm ^ /WARNINGS=MODIFIED_UNREF
-gnatwM ^ /WARNINGS=NOMODIFIED_UNREF -gnatwM ^ /WARNINGS=NOMODIFIED_UNREF
-gnatw.m ^ /WARNINGS=SUSPICIOUS_MODULUES -gnatw.m ^ /WARNINGS=SUSPICIOUS_MODULUES
-gnatw.M ^ /WARNINGS=NOSUSPICIOUS_MODULUES -gnatw.M ^ /WARNINGS=NOSUSPICIOUS_MODULUES
-gnatwn ^ /WARNINGS=NORMAL -gnatwn ^ /WARNINGS=NORMAL
-gnatw.n ^ /WARNINGS=ATOMIC_SYNCHRONIZATION
-gnatw.N ^ /WARNINGS=NOATOMIC_SYNCHRONIZATION
-gnatwo ^ /WARNINGS=OVERLAYS -gnatwo ^ /WARNINGS=OVERLAYS
-gnatwO ^ /WARNINGS=NOOVERLAYS -gnatwO ^ /WARNINGS=NOOVERLAYS
-gnatw.o ^ /WARNINGS=OUT_PARAM_UNREF -gnatw.o ^ /WARNINGS=OUT_PARAM_UNREF
...@@ -188,14 +196,20 @@ gcc -c ^ GNAT COMPILE ...@@ -188,14 +196,20 @@ gcc -c ^ GNAT COMPILE
-gnatwr ^ /WARNINGS=REDUNDANT -gnatwr ^ /WARNINGS=REDUNDANT
-gnatwR ^ /WARNINGS=NOREDUNDANT -gnatwR ^ /WARNINGS=NOREDUNDANT
-gnatws ^ /WARNINGS=SUPPRESS -gnatws ^ /WARNINGS=SUPPRESS
-gnatw.s ^ /WARNINGS=OVERRIDING_SIZE
-gnatw.S ^ /WARNINGS=NOOVERRIDING_SIZE
-gnatwt ^ /WARNINGS=DELETED_CODE -gnatwt ^ /WARNINGS=DELETED_CODE
-gnatwT ^ /WARNINGS=NODELETED_CODE -gnatwT ^ /WARNINGS=NODELETED_CODE
-gnatw.t ^ /WARNINGS=SUSPICIOUS_CONTRACT
-gnatw.T ^ /WARNINGS=NOSUSPICIOUS_CONTRACT
-gnatwu ^ /WARNINGS=UNUSED -gnatwu ^ /WARNINGS=UNUSED
-gnatwU ^ /WARNINGS=NOUNUSED -gnatwU ^ /WARNINGS=NOUNUSED
-gnatw.u ^ /WARNINGS=UNORDERED_ENUMERATIONS -gnatw.u ^ /WARNINGS=UNORDERED_ENUMERATIONS
-gnatw.U ^ /WARNINGS=NOUNORDERED_ENUMERATIONS -gnatw.U ^ /WARNINGS=NOUNORDERED_ENUMERATIONS
-gnatwv ^ /WARNINGS=VARIABLES_UNINITIALIZED -gnatwv ^ /WARNINGS=VARIABLES_UNINITIALIZED
-gnatwV ^ /WARNINGS=NOVARIABLES_UNINITIALIZED -gnatwV ^ /WARNINGS=NOVARIABLES_UNINITIALIZED
-gnatw.v ^ /WARNINGS=REVERSE_BIT_ORDER
-gnatw.V ^ /WARNINGS=NOREVERSE_BIT_ORDER
-gnatww ^ /WARNINGS=LOWBOUND_ASSUMED -gnatww ^ /WARNINGS=LOWBOUND_ASSUMED
-gnatwW ^ /WARNINGS=NOLOWBOUND_ASSUMED -gnatwW ^ /WARNINGS=NOLOWBOUND_ASSUMED
-gnatw.w ^ /WARNINGS=WARNINGS_OFF_PRAGMAS -gnatw.w ^ /WARNINGS=WARNINGS_OFF_PRAGMAS
...@@ -204,8 +218,8 @@ gcc -c ^ GNAT COMPILE ...@@ -204,8 +218,8 @@ gcc -c ^ GNAT COMPILE
-gnatwX ^ /WARNINGS=NOIMPORT_EXPORT_PRAGMAS -gnatwX ^ /WARNINGS=NOIMPORT_EXPORT_PRAGMAS
-gnatw.x ^ /WARNINGS=LOCAL_RAISE_HANDLING -gnatw.x ^ /WARNINGS=LOCAL_RAISE_HANDLING
-gnatw.X ^ /WARNINGS=NOLOCAL_RAISE_HANDLING -gnatw.X ^ /WARNINGS=NOLOCAL_RAISE_HANDLING
-gnatwy ^ /WARNINGS=ADA_2005_COMPATIBILITY -gnatwy ^ /WARNINGS=ADA_COMPATIBILITY
-gnatwY ^ /WARNINGS=NOADA_2005_COMPATIBILITY -gnatwY ^ /WARNINGS=NOADA_COMPATIBILITY
-gnatw.y ^ /WARNINGS=WHY_SPEC_NEEDS_BODY -gnatw.y ^ /WARNINGS=WHY_SPEC_NEEDS_BODY
-gnatw.Y ^ /WARNINGS=NOWHY_SPEC_NEEDS_BODY -gnatw.Y ^ /WARNINGS=NOWHY_SPEC_NEEDS_BODY
-gnatwz ^ /WARNINGS=UNCHECKED_CONVERSIONS -gnatwz ^ /WARNINGS=UNCHECKED_CONVERSIONS
...@@ -250,3 +264,4 @@ stderr ^ SYS$ERROR ...@@ -250,3 +264,4 @@ stderr ^ SYS$ERROR
-H32 ^ /32_MALLOC -H32 ^ /32_MALLOC
-H64 ^ /64_MALLOC -H64 ^ /64_MALLOC
-Wall ^ /WARNINGS=ALL_GCC -Wall ^ /WARNINGS=ALL_GCC
-Wuninitialized ^ /WARNINGS=UNINITIALIZED
...@@ -3132,6 +3132,10 @@ package VMS_Data is ...@@ -3132,6 +3132,10 @@ package VMS_Data is
"-gnatwi " & "-gnatwi " &
"NOIMPLEMENTATION " & "NOIMPLEMENTATION " &
"-gnatwI " & "-gnatwI " &
"OVERLAPPING_ACTUALS " &
"-gnatw.i " &
"NOOVERLAPPING_ACTUALS " &
"-gnatw.I " &
"OBSOLESCENT " & "OBSOLESCENT " &
"-gnatwj " & "-gnatwj " &
"NOOBSOLESCENT " & "NOOBSOLESCENT " &
...@@ -3148,6 +3152,10 @@ package VMS_Data is ...@@ -3148,6 +3152,10 @@ package VMS_Data is
"-gnatwl " & "-gnatwl " &
"NOELABORATION " & "NOELABORATION " &
"-gnatwL " & "-gnatwL " &
"INHERITED_ASPECTS " &
"-gnatw.l " &
"NOINHERITED_ASPECTS " &
"-gnatw.L " &
"MODIFIED_UNREF " & "MODIFIED_UNREF " &
"-gnatwm " & "-gnatwm " &
"NOMODIFIED_UNREF " & "NOMODIFIED_UNREF " &
...@@ -3158,6 +3166,10 @@ package VMS_Data is ...@@ -3158,6 +3166,10 @@ package VMS_Data is
"-gnatw.M " & "-gnatw.M " &
"NORMAL " & "NORMAL " &
"-gnatwn " & "-gnatwn " &
"ATOMIC_SYNCHRONIZATION " &
"-gnatw.n " &
"NOATOMIC_SYNCHRONIZATION " &
"-gnatw.N " &
"OVERLAYS " & "OVERLAYS " &
"-gnatwo " & "-gnatwo " &
"NOOVERLAYS " & "NOOVERLAYS " &
...@@ -3170,12 +3182,12 @@ package VMS_Data is ...@@ -3170,12 +3182,12 @@ package VMS_Data is
"-gnatwp " & "-gnatwp " &
"NOINEFFECTIVE_INLINE " & "NOINEFFECTIVE_INLINE " &
"-gnatwP " & "-gnatwP " &
"MISSING_PARENS " &
"-gnatwq " &
"PARAMETER_ORDER " & "PARAMETER_ORDER " &
"-gnatw.p " & "-gnatw.p " &
"NOPARAMETER_ORDER " & "NOPARAMETER_ORDER " &
"-gnatw.P " & "-gnatw.P " &
"MISSING_PARENS " &
"-gnatwq " &
"NOMISSING_PARENS " & "NOMISSING_PARENS " &
"-gnatwQ " & "-gnatwQ " &
"REDUNDANT " & "REDUNDANT " &
...@@ -3196,6 +3208,10 @@ package VMS_Data is ...@@ -3196,6 +3208,10 @@ package VMS_Data is
"-gnatwt " & "-gnatwt " &
"NODELETED_CODE " & "NODELETED_CODE " &
"-gnatwT " & "-gnatwT " &
"SUSPICIOUS_CONTRACT " &
"-gnatw.t " &
"NOSUSPICIOUS_CONTRACT " &
"-gnatw.T " &
"UNINITIALIZED " & "UNINITIALIZED " &
"-Wuninitialized " & "-Wuninitialized " &
"UNUSED " & "UNUSED " &
...@@ -3230,9 +3246,9 @@ package VMS_Data is ...@@ -3230,9 +3246,9 @@ package VMS_Data is
"-gnatw.x " & "-gnatw.x " &
"NOLOCAL_RAISE_HANDLING " & "NOLOCAL_RAISE_HANDLING " &
"-gnatw.X " & "-gnatw.X " &
"ADA_2005_COMPATIBILITY " & "ADA_COMPATIBILITY " &
"-gnatwy " & "-gnatwy " &
"NOADA_2005_COMPATIBILITY " & "NOADA_COMPATIBILITY " &
"-gnatwY " & "-gnatwY " &
"WHY_SPEC_NEEDS_BODY " & "WHY_SPEC_NEEDS_BODY " &
"-gnatw.y " & "-gnatw.y " &
...@@ -3256,272 +3272,382 @@ package VMS_Data is ...@@ -3256,272 +3272,382 @@ package VMS_Data is
-- error. Second, if the compiler detects a situation that is sure to -- error. Second, if the compiler detects a situation that is sure to
-- raise an exception at runtime, it generates a warning message. -- raise an exception at runtime, it generates a warning message.
-- --
-- You may specify the following keywords to change this behavior: -- You may specify the following keywords to change this behavior.
-- --
-- DEFAULT (D) The default behavior above. -- DEFAULT (D) The default behavior. This includes the
-- -- following categories of warnings:
-- ALL Activate all optional warnings. --
-- Activates most optional warning messages, -- ADA_COMPATIBILITY
-- see remaining list in this section for -- ADDRESS_CLAUSE_OVERLAY
-- details on optional warning messages that -- BIASED_REPRESENTATION
-- can be individually controlled. -- IMPORT_EXPORT_PRAGMAS
-- The warnings that are not turned on by -- FAILING_ASSERTIONS
-- this option are BIASED_ROUNDING, -- IMPLEMENTATION
-- IMPLICIT_DEREFERENCE, HIDING and -- LOWBOUND_ASSUMED
-- ELABORATION. All other optional Ada -- MISSING_PARENS
-- warnings are turned on. -- OVERLAPPING_ACTUALS
-- -- REVERSE_BIT_ORDER
-- EVERY Activate every optional warning. -- SUSPICIOUS_CONTRACT
-- Activates all optional warnings, including -- SUSPICIOUS_MODULUS
-- those listed above as exceptions for ALL. -- UNCHECKED_CONVERSIONS
-- -- UNRECOGNIZED_PRAGMA
-- NOALL Suppress all optional errors. -- VARIABLES_UNINITIALIZED
-- Suppresses all optional warning messages --
-- that can be activated by option ALL. -- as well as all warnings that cannot be
-- -- individually suppressed.
-- ALL_GCC Request additional messages from the GCC --
-- backend. Most of these are not relevant -- ALL Activate all optional warnings.
-- to Ada. -- Activates the most commong used optional
-- -- warning messages. The warnings that are not
-- CONDITIONALS Activate warnings for conditional -- turned on by this are:
-- Expressions used in tests that are known --
-- to be True or False at compile time. The -- ADDRESS_CLAUSE_OVERLAY
-- default is that such warnings are not -- ATOMIC_SYNCHRONIZATION
-- generated. -- AVOID_GAPS
-- BAD_FIXED_VALUE
-- BIASED_ROUNDING
-- DELETED_CODE
-- ELABORATION
-- HIDING
-- IMPLICIT_DEREFERENCE
-- INHERITED_ASPECTS
-- OUT_PARAM_UNREF
-- OVERLAPPING_ACTUALS
-- OVERRIDING_SIZE
-- STANDARD_REDEFINITION
-- SUSPICIOUS_MODULUS
-- UNORDERED_ENUMERATION
-- WARNINGS_OFF_PRAGMAS
-- WHY_BODY_NEEDED
--
-- All other optional warnings are turned on.
--
-- OPTIONAL Turn on standard optional warnings.
-- This has the same effect as ALL.
--
-- NOALL Suppress all optional errors.
-- Suppresses all optional warning messages
-- including those not activated by ALL.
--
-- NOOPTIONAL Turn off standard optional warnings.
-- This has the same effect as NOALL
--
-- EVERY Activate every optional warning.
-- Activates all optional warnings, including
-- those listed above as exceptions for ALL.
--
-- ALL_GCC Request additional messages from the GCC
-- backend. Most of these are not Ada-relevant.
--
-- UNINITIALIZED Activate warnings for uninitialized
-- variables. This is a GCC option, not an Ada
-- option. You must also specify the /OPTIMIZE
-- qualifier with a value other than NONE (in
-- other words, this option is effective only
-- if optimization is turned on).
-- ERRORS Warning messages are to be treated as errors.
-- The warning string still appears, but the
-- warning messages are counted as errors, and
-- prevent the generation of an object file.
--
-- SUPPRESS Completely suppress the output of all warning
-- messages. Same as /NOWARNINGS.
--
-- NORMAL Sets normal warning mode, in which enabled
-- warnings are issued and treated as warnings
-- rather than errors. This is the default mode.
-- It can be used to cancel the effect of an
-- explicit /WARNINGS=SUPPRESS or
-- /WARNINGS=ERRORS. It also cancels the effect
-- of the implicit /WARNINGS=ERRORS that is
-- activated by the use of /STYLE=GNAT.
--
-- TAG_WARNINGS Causes the string [xxx] to be added to
-- warnings that are controlled by the warning
-- switch -gnat??. See below for list of these
-- equivalent switch names.
-- --
-- NOCONDITIONALS Suppress warnings for conditional -- NOTAG_WARNINGS Turns off warning tag output (default setting).
-- expressions used in tests that are known
-- to be True or False at compile time.
-- --
-- IMPLICIT_DEREFERENCE Activate warnings on implicit dereferencing. -- The remaining entries control individual warning categories. If one
-- The use of a prefix of an access type in an -- of these options is preceded by NO (e.g. NOAVOID_GAPS), then the
-- indexed component, slice, or selected component -- corresponding class of warnings is suppressed. The -gnatwxx tag
-- without an explicit .all will generate -- below the name indicates the non-VMS warning switch option. This is
-- a warning. With this warning enabled, access -- used in the warning tags generated by TAG_WARNINGS (above)
-- checks occur only at points where an explicit --
-- .all appears in the source code (assuming no -- ADA_COMPATIBILITY Activate warnings for Ada compatibility issues.
-- warnings are generated as a result of this -- (-gnatwy) This generates warnings for usages which are
-- option). The default is that such warnings are -- legal, but may cause difficulties with later
-- not generated. Note that /WARNINGS=ALL does not -- Ada versions (e.g. the use of INTERFACE as an
-- affect the setting of this warning option. -- identifier, which is legal in Ada 85, but in
-- -- Ada 2005, this is a reserved word).
-- NOIMPLICIT_DEREFERENCE Suppress warnings on implicit dereferencing. --
-- in indexed components, slices, and selected -- ATOMIC_SYNCHRONIZATION Activate info msgs for atomic synchronization.
-- components. -- (-gnatw.n) This generates information messages when an
-- -- access to an atomic variable requires the
-- ELABORATION Activate warnings on missing pragma -- generation of atomic synchronization code.
-- Elaborate_All statements. The default is --
-- that such warnings are not generated. -- AVOID_GAPS Activate warnings for gaps in records.
-- -- (-gnatw.h) This outputs a warning if a representation
-- NOELABORATION Suppress warnings on missing pragma -- clause for a record leaves unallocated bits.
-- Elaborate_All statements. --
-- -- BAD_FIXED_VALUES Activate warnings on bad fixed values.
-- ERRORS Warning messages are to be treated as errors. -- (-gnatwb) When this is enabled, a fixed-type literal
-- The warning string still appears, but the -- will generate a warning if its value does not
-- warning messages are counted as errors, and -- correspond to an exact value of the type and
-- prevent the generation of an object file. -- is thus subject to rounding.
--
-- BIASED_REPRESENTATION Activate warnings for biased representations.
-- (-gnatw.b) A warning will be generated if a size clause
-- or a component clause forces use of a biased
-- representation (e.g. range 1..5 with size 2).
--
-- CONDITIONALS Activate warnings for conditional expressions
-- (-gnatwc) in tests where the expression is known to
-- be True or False at compile time.
--
-- DELETED_CODE Activate warning for conditional deleted code.
-- (-gnatwt) This option generates warnings for tracking of
-- code in conditionals (IF and CASE statements)
-- that is detected to be dead code which cannot
-- be executed, and which is removed by the
-- front end. This may be useful for detecting
-- deactivated code in certified applications.
--
-- CONSTANT_VARIABLES Activate warnings on constant variables.
-- (-gnatwk) A warning is output for a variable which could
-- have been declared as a constant.
--
-- ELABORATION Activate warnings on missing pragma Elaborate
-- (-gnatwl) and Elaborate_All statements.
--
-- FAILING_ASSERTIONS Activate warnings on failing assertions.
-- (-gnatw.a) Generates a warning for assertions that are
-- sure to fail.
-- --
-- HIDING Activate warnings on hiding declarations. -- HIDING Activate warnings on hiding declarations.
-- A declaration is considered hiding if it is -- (-gnatwh) A declaration is considered hiding if it is
-- for a non-overloadable entity, and it declares -- for a non-overloadable entity, and declares
-- an entity with the same name as some other -- an entity with the same name as some other
-- entity that is directly or use-visible. The -- entity that is directly or use-visible.
-- default is that such warnings are not
-- generated.
-- --
-- NOHIDING Suppress warnings on hiding declarations. -- IMPORT_EXPORT_PRAGMAS Activate warnings on import-export pragmas.
-- (-gnatwx) This generates a warning on an Export or Import
-- pragma when the compiler detects a possible
-- conflict between the Ada and foreign language
-- calling sequences. For example, the use of
-- default parameters in a convention C procedure
-- is dubious because the C compiler cannot supply
-- the proper default, so a warning is issued.
-- --
-- IMPLEMENTATION Activate warnings for a with of an internal -- IMPLEMENTATION Activate warnings for a with of an internal
-- GNAT implementation unit, defined as any unit -- (-gnatwi) GNAT implementation unit, defined as any unit
-- from the Ada, Interfaces, GNAT, DEC or -- from the Ada, Interfaces, GNAT, DEC or System
-- System hierarchies that is not documented in -- hierarchies that is not documented in the
-- either the Ada Reference Manual or the GNAT -- Ada Reference Manual or the GNAT Programmer's
-- Programmer's Reference Manual. Such units are -- Reference Manual. Such units are intended only
-- intended only for internal implementation -- for internal implementation purposes and may
-- purposes and should not be with'ed by user -- change from version to veresion, and should
-- programs. The default is that such warnings -- not be with'ed by user programs.
-- are generated. --
-- -- IMPLICIT_DEREFERENCE Activate warnings on implicit dereferencing.
-- NOIMPLEMENTATION Disables warnings for a with of an internal -- (-gnatwd) The use of a prefix of an access type in an
-- GNAT implementation unit. -- indexed component, slice, or selected component
-- -- without an explicit .all will generate a
-- INEFFECTIVE_INLINE Activate warnings on ineffective pragma Inlines -- warning. When this warning is enabled, and no
-- Activates warnings for failure of front end -- warnings of this type are generated, access
-- inlining (activated by /INLINE=FULL) to inline -- checks occur only at points where the source
-- a particular call. There are many reasons for -- program contains an explicit use of .all.
-- not being able to inline a call, including most --
-- INEFFECTIVE_INLINE Activate warnings on ineffective Inlines.
-- (-gnatwp) Activates warnings for failure of front end
-- inlining (activated by /INLINE=FULL) to
-- inline a particular call when a pragma Inline
-- applies. There are many reasons for not
-- being able to inline a call, including most
-- commonly that the call is too complex to -- commonly that the call is too complex to
-- inline. This warning can also be turned on -- inline. This warning can also be turned on
-- using /INLINE=FULL. -- using /INLINE=FULL.
-- --
-- NOINEFFECTIVE_INLINE Suppress warnings on ineffective pragma Inlines -- INHERITED_ASPECTS Activate info messages for inherited aspects.
-- Suppresses warnings on ineffective pragma -- (-gantw.l) Outputs information messages for tagged types
-- Inlines. If the inlining mechanism cannot -- that inherit aspects from a parent.
-- inline a call, it will simply ignore the
-- request silently.
-- --
-- MISSING_COMPONENT_CLAUSES -- LOCAL_RAISE_HANDLING Activate warnings for No_Exception_Propagation.
-- Activate warnings for cases when there are -- (-gnatw.x) This generates warnings for exception usage
-- component clauses for a record type, but not -- when the No_Exception_Propagation restriction
-- for every component of the record. -- is in effect. Warnings are given for implicit
-- or explicit exception raises which are not
-- covered by a local handler, and for exception
-- handlers which do not cover a local raise.
-- --
-- NOMISSING_COMPONENT_CLAUSES -- LOWBOUND_ASSUMED Activate warnings for low bound assumptions.
-- Suppress warnings for cases when there are -- (-gnatww) Outputs warnings if code appears to depend on
-- missing component clauses for a record type. -- an assumption about the lower bound of one of
-- the subprogram parameters (for example using
-- S(1 .. 5) instead of S(S'First .. S'First + 4).
-- --
-- MISSING_PARENS -- MISSING_COMPONENT_CLAUSES
-- Activate warnings for cases where parentheses -- (-gnatw.c) Activate warnings for unrepped component.
-- Generates a warning for a record component
-- which does not have a component clause if
-- at least one component claused is present
-- for some other component of the record.
--
-- MISSING_PARENS Activate warnings for missing parentheses.
-- (-gnatwq) Outputs a warning for cases where parentheses
-- are not used and the result is potential -- are not used and the result is potential
-- ambiguity from a reader's point of view. -- ambiguity from a reader's point of view.
-- For example (not a > b) when a and b are -- For example (not a > b) when a and b are
-- modular means (not (a) > b) and very likely -- modular means (not (a) > b) and very likely
-- the programmer intended (not (a > b)). -- the programmer intended (not (a > b)).
-- --
-- NOMISSING_PARENS -- MODIFIED_UNREF Activate warning for assigned but not read.
-- Suppress warnings for cases where parentheses -- (-gnatwm) Outputs a warning for variables that are
-- are not used and the result is potential -- assigned (using an initialization value or an
-- ambiguity from a reader's point of view. -- assignment statements) but whose value is
-- -- never read. The warning is suppressed for
-- MODIFIED_UNREF Activates warnings for variables that are -- volatile variables and also for variables
-- assigned (using an initialization value or with
-- one or more assignment statements) but whose
-- value is never read. The warning is suppressed
-- for volatile variables and also for variables
-- that are renamings of other variables or for -- that are renamings of other variables or for
-- which an address clause is given. This warning -- which an address clause is given.
-- can also be turned on using /WARNINGS/OPTIONAL.
--
-- NOMODIFIED_UNREF Disables warnings for variables that are
-- assigned or initialized, but never read.
-- --
-- NORMAL Sets normal warning mode, in which enabled -- OBJECT_RENAME Activate warnings for non limited objects
-- warnings are issued and treated as warnings -- (-gnatw.r) renaming parameterless functions.
-- rather than errors. This is the default mode.
-- It can be used to cancel the effect of an
-- explicit /WARNINGS=SUPPRESS or
-- /WARNINGS=ERRORS. It also cancels the effect
-- of the implicit /WARNINGS=ERRORS that is
-- activated by the use of /STYLE=GNAT.
-- --
-- OBSOLESCENT Activates warnings for calls to subprograms -- OBSOLESCENT Activates warnings for calls to subprograms
-- marked with pragma Obsolescent and for use of -- (-gnatwj) marked with pragma Obsolescent and for use of
-- features in Annex J of the Ada Reference -- features in Annex J of the Ada Reference
-- Manual. In the case of Annex J, not all -- Manual. In the case of Annex J, not all
-- features are flagged. In particular use of the -- features are flagged. In particular use of
-- renamed packages (like Text_IO), use of package -- the renamed packages (like Text_IO), use of
-- ASCII and use of the attribute 'Constrained are -- package ASCII, and use of the attribute
-- not flagged, since these are very common and -- 'Constrained are not flagged, since these are
-- would generate many annoying positive warnings. -- common and would generate many annoying
-- The default is that such warnings are not -- false-positive warnings.
-- generated. --
-- -- OUT_PARAM_UNREF Activate warnings on unreferenced OUT params.
-- NOOBSOLESCENT Disables warnings on use of obsolescent -- (-gantw.o) This switch activates warnings for variables
-- features. -- that are modified by using them as actuals for
-- -- a call to a procedure with an out mode formal,
-- OBJECT_RENAME Activate warnings for non limited objects -- where the resulting assigned value is never
-- renaming parameterless functions. -- read. It is applicable in the case where there
-- -- is more than one out mode formal. If there is
-- NOOBJECT_RENAME Suppress warnings for non limited objects -- only one out mode formal, the warning is issued
-- renaming parameterless functions. -- by default (controlled by UNUSED). The warning
-- -- is suppressed for volatile variables and also
-- OPTIONAL Equivalent to ALL. -- for variables that are renamings of other
-- -- variables or for which an address clause
-- NOOPTIONAL Equivalent to NOALL. -- is given.
--
-- OVERLAPPING_ACTUALS Activate warnings on overlapping actuals.
-- (-gnatw.i) Enables a warning on statically detectable
-- overlapping actuals in a subprogram call,
-- when one of the actuals is an in-out
-- parameter, and the types of the actuals
-- are not by-copy types.
-- --
-- OVERLAYS Activate warnings for possibly unintended -- OVERLAYS Activate warnings for possibly unintended
-- initialization effects of defining address -- (-gnatwo) initialization effects of defining address
-- clauses that cause one variable to overlap
-- another. The default is that such warnings
-- are generated.
--
-- NOOVERLAYS Suppress warnings on possibly unintended
-- initialization effects of defining address
-- clauses that cause one variable to overlap -- clauses that cause one variable to overlap
-- another. -- another.
-- --
-- REDUNDANT Activate warnings for redundant constructs. -- OVERRIDING_SIZE Activate warning on overridden size clause.
-- In particular assignments of a variable to -- (-gnatw.s) Generates a warning if an explicit size clause
-- itself, and a type conversion that converts -- is overridden by a component clause in a record
-- an object to its own type. The default -- or a component size in an array.
-- is that such warnings are not generated.
-- --
-- NOREDUNDANT Suppress warnings for redundant constructs. -- PARAMETER_ORDER Activate warnings for suspicious parameter
-- (-gnatw.p) ordering. A warning is generated if positional
-- ordering is used and the actuals match the
-- formal names, but are in the wrong order (e.g.
-- GEN (B, A), when the formals of GEN are A, B.)
-- No warning is generated for named parameters,
-- so GEN (A => B, B => A) would be allowed.
-- --
-- SUPPRESS Completely suppress the output of all warning -- REDUNDANT Activate warnings for redundant constructs.
-- messages. Same as /NOWARNINGS. -- (-gnatwr) In particular assignments of a variable to
-- itself, and a type conversion that converts
-- an object to its own type.
--
-- REVERSE_BIT_ORDER Activates info messages for reverse bit order.
-- (-gnatw.v) Generates information messages that show the
-- effect of specifying reverse bit order for
-- a record on individual components.
--
-- STANDARD_REDEFINITION Activate warnings on standard redefinition.
-- (-gnatw.k) Generates a warning message if a declaration
-- declares an identifier that matches one that
-- is declared in package Standard (e.g. Float).
--
-- SUSPICIOUS_CONTRACT Activate warnings on suspicious postconditions.
-- (-gnatw.t) This generates warnings if a postcondition for
-- a function does not mention the result, or if
-- a postcondition for a procedure depends only on
-- the entry values of the parameters.
--
-- SUSPICIOUS_MODULUS Warn on suspicious modulus values, for
-- (-gnatw.m) example "mod 7" is suspicious for a size with
-- 7 bits, since it was likely intended to be
-- "mod 2**7". Similarly "mod 32" is considered
-- suspicious, since it was likely intended to
-- be "mod 2**32".
-- --
-- UNCHECKED_CONVERSIONS Activates warnings on unchecked conversions. -- UNCHECKED_CONVERSIONS Activates warnings on unchecked conversions.
-- Causes warnings to be generated for -- (-gnatwz) Causes warnings to be generated for unchecked
-- unchecked conversions when the two types are -- conversions between types that are known at
-- known at compile time to have different sizes. -- compile time to have different sizes.
-- The default is that such warnings are
-- generated.
-- --
-- NOUNCHECKED_CONVERSIONS Suppress warnings for unchecked conversions. -- UNORDERED_ENUMERATION Activate warnings for unordered enumeration.
-- (-gnatw.u) Causes warnings to be generated if for an
-- enumeration type that does not have a pragma
-- Ordered that applies, if a subtype with a
-- range is used, or a comparison other than
-- [in]equality appears for values of the type.
-- --
-- UNINITIALIZED Generate warnings for uninitialized variables. -- UNRECOGNIZED_PRAGMAS Activate warnings for unrecognized pragmas.
-- This is a GCC option, not an Ada option. -- (-gnatwg) Such pragmas are ignored other than generating
-- You must also specify the /OPTIMIZE qualifier -- these warnings.
-- with a value other than NONE (in other words,
-- this keyword works only if optimization is
-- turned on).
-- --
-- UNREFERENCED_FORMALS Activate warnings on unreferenced formals. -- UNREFERENCED_FORMALS Activate warnings on unreferenced formals.
-- Causes a warning to be generated if a formal -- (-gnatwf) Causes a warning to be generated if a formal
-- parameter is not referenced in the body of -- parameter is not referenced in the body of
-- the subprogram. This warning can also be turned -- the subprogram. Note that the combination
-- on using option ALL or UNUSED. -- UNUSED followed by NOUNREFERENCED_FORMALS
-- -- has the effect of warning on unreferenced
-- NOUNREFERENCED_FORMALS Suppress warnings on unreferenced formals. -- entities other than subprogram formals.
-- Suppresses warnings for unreferenced formal
-- parameters. Note that the combination UNUSED
-- followed by NOUNREFERENCED_FORMALS has the
-- effect of warning on unreferenced entities
-- other than subprogram formals.
-- --
-- UNUSED Activates warnings to be generated for entities -- UNUSED Activates warnings to be generated for entities
-- that are defined but not referenced, and for -- (-gantwu) that are defined but not referenced, and for
-- units that are with'ed and not referenced. In -- units that are with'ed and not referenced. In
-- the case of packages, a warning is also -- the case of packages, a warning is also
-- generated if no entities in the package are -- generated if no entities in the package are
-- referenced. This means that if the package -- referenced. This means that if the package
-- is referenced but the only references are in -- is referenced but the only references are in
-- use clauses or renames declarations, a warning -- in use clauses or renames declarations, a
-- is still generated. A warning is also generated -- warning is still generated. A warning is also
-- for a generic package that is with'ed but never -- generated for a generic package that is
-- instantiated. In the case where a package or -- with'ed but never instantiated. In the case
-- subprogram body is compiled, and there is a -- where a package or subprogram body is
-- with on the corresponding spec that is only -- compiled, and there is a with on the
-- referenced in the body, a warning is also -- corresponding spec that is only referenced
-- generated, noting that the with can be moved -- in the body, a warning is also generated,
-- to the body. The default is that such warnings -- noting the with can be moved to the body.
-- are not generated.
--
-- NOUNUSED Suppress warnings for unused entities and
-- packages.
-- --
-- VARIABLES_UNINITIALIZED Activates warnings on unassigned variables. -- VARIABLES_UNINITIALIZED Activates warnings on unassigned variables.
-- Causes warnings to be generated when a variable -- (-gnatwv) Causes warnings to be generated when a
-- is accessed which may not be properly -- variable is accessed which may not be
-- uninitialized. The default is that such -- properly initialized.
-- warnings are generated.
--
-- NOVARIABLES_UNINITIALIZED
-- Suppress warnings for uninitialized variables.
-- --
-- TAG_WARNINGS Causes the string [xxx] to be added to warnings -- WARNINGS_OFF_PRAGMAS Activates warnings for pragma Warnings (Off).
-- that are controlled by the warning string xxx, -- (-gnatw.w) This generates a warning if the specific string
-- e.g. [REDUNDANT], or if the warning is enabled -- version the pragma is used as a local pragma
-- by default, the tag is [enabled by default]. -- (i.e. not a configuration pragma) and no
-- -- warning is suppressed as a result.
-- NOTAG_WARNINGS Turns off warning tag output (default setting).
-- --
-- WHY_SPEC_NEEDS_BODY Generates information messages showing why a -- WHY_SPEC_NEEDS_BODY Generates information messages showing why a
-- package specification requires a body. -- (-gnatw.y) package specification requires a body.
-- --
-- NO_WHY_SPEC_NEEDS_BODY Turns off information messages showing why a
-- package specification requires a body.
S_GCC_WarnX : aliased constant S := "/NOWARNINGS " & S_GCC_WarnX : aliased constant S := "/NOWARNINGS " &
"-gnatws"; "-gnatws";
-- NODOC (see /WARNINGS) -- NODOC (see /WARNINGS)
......
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