+2014-05-21 Robert Dewar <dewar@adacore.com>
+
+ * gnat_ugn.texi: Clearly document -gnatw.g (GNAT warnings).
+ Clearly document -gnatyg (GNAT style switches).
+ * usage.adb: Add line line for -gnatw.g (GNAT warnings) More
+ detail for line for -gnatyg (GNAT style switches) -gnatw.d/D is
+ available for VMS after all.
+ * warnsw.adb: Reorganize to eliminate duplicated code
+ (Restore_Warnings): Add a couple of missing entries
+ (Save_Warnings): Add a couple of missing entries.
+ * warnsw.ads: Add missing entries to Warning_Record (not clear
+ what the impact is).
+
+2014-05-21 Robert Dewar <dewar@adacore.com>
+
+ * errout.adb (Set_Msg_Insertion_Warning): Handle ?*? (restriction
+ warning) case.
+ * errout.ads: Document ?*? (restriction warning) insertion.
+ * erroutc.adb (Get_Warning_Tag): Deal with ?*? (restriction
+ warning) case.
+ * erroutc.ads: Document use of * for restriction warning tag.
+ * restrict.adb (Restriction_Msg): Tag with ?*? instead of ??.
+
+2014-05-21 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch9.adb (Push_Scope_And_Install_Discriminants): Do not
+ make discriminants immediately visible when analyzing an aspect
+ of a subtype declaration.
+ (Uninstall_Discriminants): Do not apply to the entity in a
+ subtype declaration.
+
2014-05-21 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb: Code clean up.
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
elsif P + 1 <= Text'Last
and then (Text (P) in 'a' .. 'z'
or else
- Text (P) in 'A' .. 'Z')
+ Text (P) in 'A' .. 'Z'
+ or else
+ Text (P) = '*')
and then Text (P + 1) = C
then
Warning_Msg_Char := Text (P);
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- Exception raised if Raise_Exception_On_Error is true
Warning_Doc_Switch : Boolean renames Err_Vars.Warning_Doc_Switch;
- -- If this is set True, then the ??/?x?/?X? sequences in error messages
- -- are active (see errout.ads for details). If this switch is False, then
- -- these sequences are ignored (i.e. simply equivalent to a single ?). The
- -- -gnatw.d switch sets this flag True, -gnatw.D sets this flag False.
+ -- If this is set True, then the ??/?*?/?x?/?X? sequences in error messages
+ -- generate appropriate tags for the output error messages. If this switch
+ -- is False, then these sequences are still recognized (for the purposes
+ -- of implementing pragmas Warnings (Off,..) and Warning_As_Pragma(...) but
+ -- do not result in adding the error message tag. The -gnatw.d switch sets
+ -- this flag True, -gnatw.D sets this flag False.
-----------------------------------
-- Suppression of Error Messages --
-- messages, and the usual style is to include it, since it makes it
-- clear that the continuation is part of a warning message.
--
- -- Note: this usage is obsolete, use ??, ?x? or ?X? instead to specify
+ -- Note: this usage is obsolete, use ?? ?*? ?x? ?X? instead to specify
-- the string to be added when Warn_Doc_Switch is set to True. If this
-- switch is True, then for simple ? messages it has no effect. This
-- simple form is to ease transition and will be removed later.
-- letter corresponding to the lower case letter x in the message.
-- For continuations, use this on each continuation message.
+ -- Insertion character ?*? (restriction warning)
+ -- Like ?, but if the flag Warn_Doc_Switch is True, adds the string
+ -- "[restriction warning]" at the end of the warning message. For
+ -- continuations, use this on each continuation message.
+
-- Insertion character < (Less Than: conditional warning message)
-- The character < appearing anywhere in a message is used for a
-- conditional error message. If Error_Msg_Warn is True, then the
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
if Warn and then Warn_Chr /= ' ' then
if Warn_Chr = '?' then
return "[enabled by default]";
+ elsif Warn_Chr = '*' then
+ return "[restriction warning]";
elsif Warn_Chr in 'a' .. 'z' then
return "[-gnatw" & Warn_Chr & ']';
else pragma Assert (Warn_Chr in 'A' .. 'Z');
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
Warning_Msg_Char : Character;
-- Warning character, valid only if Is_Warning_Msg is True
- -- ' ' -- ? appeared on its own in message
- -- '?' -- ?? appeared in message
- -- 'x' -- ?x? appeared in message
- -- 'X' -- ?x? appeared in message (X is upper case of x)
+ -- ' ' -- ? appeared on its own in message
+ -- '?' -- ?? appeared in message
+ -- 'x' -- ?x? appeared in message (x = a .. z)
+ -- 'X' -- ?X? appeared in message (X = A .. Z)
+ -- '*' -- ?*? appeared in message
Is_Style_Msg : Boolean := False;
-- Set True to indicate if the current message is a style message
Warn_Chr : Character;
-- Warning character (note: set even if Warning_Doc_Switch is False)
- -- ' ' -- ? appeared on its own in message or no ? in message
- -- '?' -- ?? appeared in message
- -- 'x' -- ?x? appeared in message
- -- 'X' -- ?x? appeared in message (X is upper case of x)
+ -- ' ' -- ? appeared on its own in message
+ -- '?' -- ?? appeared in message
+ -- 'x' -- ?x? appeared in message (x = a .. z)
+ -- 'X' -- ?X? appeared in message (X = A .. Z)
+ -- '*' -- ?*? appeared in message
Style : Boolean;
-- True if style message (starts with "(style)")
applications programs, it is intended only for use by the compiler
and its run-time library. For documentation, see the GNAT sources.
Note that @option{^-gnatg^/GNAT_INTERNAL^} implies
-@option{^-gnatwae^/WARNINGS=ALL,ERRORS^} and
+@option{^-gnatw.ge^/WARNINGS=GNAT,ERRORS^} and
@option{^-gnatyg^/STYLE_CHECKS=GNAT^}
so that all standard warnings and all standard style options are turned on.
All warnings and style messages are treated as errors.
@cindex @option{-gnatwG} (@command{gcc})
This switch suppresses warnings for unrecognized pragmas.
+@item -gnatw.g
+@emph{Warnings used for GNAT sources}
+@cindex @option{-gnatw.g} (@command{gcc})
+This switch sets the warning categories that are used by the standard
+GNAT style. Currently this is equivalent to
+@option{-gnatwAao.sI.C.V.X}
+but more warnings may be added in the future without advanced notice.
+
@item -gnatwh
@emph{Activate warnings on hiding.}
@cindex @option{-gnatwh} (@command{gcc})
@emph{GNAT style mode.}
The set of style check switches is set to match that used by the GNAT sources.
This may be useful when developing code that is eventually intended to be
-incorporated into GNAT. For further details, see GNAT sources.
+incorporated into GNAT. Currently this is equivalent to @option{-gnatwydISux})
+but additional style switches may be added to this set in the future without
+advance notice.
@item ^h^HTABS^
@emph{No horizontal tabs.}
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- Set warning message if warning
if Restriction_Warnings (R) then
- Add_Str ("??");
+ Add_Str ("?*?");
-- If real violation (not warning), then mark it as non-serious unless
-- it is a violation of No_Finalization in which case we leave it as a
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
begin
if Has_Discriminants (E) then
Push_Scope (E);
- Install_Discriminants (E);
+
+ -- Make discriminants visible for type declarations and protected
+ -- type declarations, not for subtype declarations (RM 13.1.1 (12/3))
+
+ if Nkind (Parent (E)) /= N_Subtype_Declaration then
+ Install_Discriminants (E);
+ end if;
end if;
end Push_Scope_And_Install_Discriminants;
Outer : Entity_Id;
begin
- Disc := First_Discriminant (E);
- while Present (Disc) loop
- if Disc /= Current_Entity (Disc) then
- Prev := Current_Entity (Disc);
- while Present (Prev)
- and then Present (Homonym (Prev))
- and then Homonym (Prev) /= Disc
- loop
- Prev := Homonym (Prev);
- end loop;
- else
- Prev := Empty;
- end if;
+ -- Discriminants have been made visible for type declarations and
+ -- protected type declarations, not for subtype declarations.
+
+ if Nkind (Parent (E)) /= N_Subtype_Declaration then
+ Disc := First_Discriminant (E);
+ while Present (Disc) loop
+ if Disc /= Current_Entity (Disc) then
+ Prev := Current_Entity (Disc);
+ while Present (Prev)
+ and then Present (Homonym (Prev))
+ and then Homonym (Prev) /= Disc
+ loop
+ Prev := Homonym (Prev);
+ end loop;
+ else
+ Prev := Empty;
+ end if;
- Set_Is_Immediately_Visible (Disc, False);
+ Set_Is_Immediately_Visible (Disc, False);
- Outer := Homonym (Disc);
- while Present (Outer) and then Scope (Outer) = E loop
- Outer := Homonym (Outer);
- end loop;
+ Outer := Homonym (Disc);
+ while Present (Outer) and then Scope (Outer) = E loop
+ Outer := Homonym (Outer);
+ end loop;
- -- Reset homonym link of other entities, but do not modify link
- -- between entities in current scope, so that the back-end can have
- -- a proper count of local overloadings.
+ -- Reset homonym link of other entities, but do not modify link
+ -- between entities in current scope, so that the back-end can
+ -- have a proper count of local overloadings.
- if No (Prev) then
- Set_Name_Entity_Id (Chars (Disc), Outer);
+ if No (Prev) then
+ Set_Name_Entity_Id (Chars (Disc), Outer);
- elsif Scope (Prev) /= Scope (Disc) then
- Set_Homonym (Prev, Outer);
- end if;
+ elsif Scope (Prev) /= Scope (Disc) then
+ Set_Homonym (Prev, Outer);
+ end if;
- Next_Discriminant (Disc);
- end loop;
+ Next_Discriminant (Disc);
+ end loop;
+ end if;
end Uninstall_Discriminants;
-------------------------------------------
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
Write_Eol;
-- Individual lines for switches. Write_Switch_Char outputs fourteen
- -- characters, so the remaining message is allowed to be a maximum
- -- of 65 characters to be comfortable in an 80 character window.
+ -- characters, so the remaining message is allowed to be a maximum of
+ -- 65 characters to be comfortable in an 80 character window.
-- Line for -gnata switch
Write_Line (" .C* turn off warnings for unrepped components");
Write_Line (" d turn on warnings for implicit dereference");
Write_Line (" D* turn off warnings for implicit dereference");
-
- -- Switches -gnatw.d/w.D not available on VMS
-
- if not OpenVMS_On_Target then
- Write_Line
- (" .d turn on tagging of warnings with -gnatw switch");
- Write_Line
- (" .D* turn off tagging of warnings with -gnatw switch");
- end if;
-
+ Write_Line (" .d turn on tagging of warnings with -gnatw switch");
+ Write_Line (" .D* turn off tagging of warnings with -gnatw switch");
Write_Line (" e treat all warnings (but not info) as errors");
Write_Line (" .e turn on every optional info/warning " &
"(no exceptions)");
Write_Line (" F* turn off warnings for unreferenced formal");
Write_Line (" g*+ turn on warnings for unrecognized pragma");
Write_Line (" G turn off warnings for unrecognized pragma");
+ Write_Line (" .g turn on GNAT warnings, same as Aao.sI.C.V.X");
Write_Line (" h turn on warnings for hiding declarations");
Write_Line (" H* turn off warnings for hiding declarations");
Write_Line (" .h turn on warnings for holes in records");
Write_Line (" d check no DOS line terminators");
Write_Line (" e check end/exit labels present");
Write_Line (" f check no form feeds/vertical tabs in source");
- Write_Line (" g check standard GNAT style rules");
+ Write_Line (" g check standard GNAT style rules, same as ydISux");
Write_Line (" h check no horizontal tabs in source");
Write_Line (" i check if-then layout");
Write_Line (" I check mode in");
-- --
-- B o d y --
-- --
--- Copyright (C) 1999-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 1999-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
package body Warnsw is
+ -- Local Subprograms
+
+ procedure All_Warnings (Setting : Boolean);
+ -- Sets all warnings off if Setting = False, and on if Setting = True
+
+ procedure WA_Warnings;
+ -- Turn on all warnings set by -gnatwa (also used by -gnatw.g)
+
+ ------------------
+ -- All_Warnings --
+ ------------------
+
+ procedure All_Warnings (Setting : Boolean) is
+ begin
+ Address_Clause_Overlay_Warnings := Setting;
+ Check_Unreferenced := Setting;
+ Check_Unreferenced_Formals := Setting;
+ Check_Withs := Setting;
+ Constant_Condition_Warnings := Setting;
+ Elab_Warnings := Setting;
+ Implementation_Unit_Warnings := Setting;
+ Ineffective_Inline_Warnings := Setting;
+ List_Body_Required_Info := Setting;
+ List_Inherited_Aspects := Setting;
+ Warn_On_Ada_2005_Compatibility := Setting;
+ Warn_On_Ada_2012_Compatibility := Setting;
+ Warn_On_All_Unread_Out_Parameters := Setting;
+ Warn_On_Assertion_Failure := Setting;
+ Warn_On_Assumed_Low_Bound := Setting;
+ Warn_On_Atomic_Synchronization := Setting;
+ Warn_On_Bad_Fixed_Value := Setting;
+ Warn_On_Biased_Representation := Setting;
+ Warn_On_Constant := Setting;
+ Warn_On_Deleted_Code := Setting;
+ Warn_On_Dereference := Setting;
+ Warn_On_Export_Import := Setting;
+ Warn_On_Hiding := Setting;
+ Warn_On_Modified_Unread := Setting;
+ Warn_On_No_Value_Assigned := Setting;
+ Warn_On_Non_Local_Exception := Setting;
+ Warn_On_Object_Renames_Function := Setting;
+ Warn_On_Obsolescent_Feature := Setting;
+ Warn_On_Overlap := Setting;
+ Warn_On_Overridden_Size := Setting;
+ Warn_On_Parameter_Order := Setting;
+ Warn_On_Questionable_Missing_Parens := Setting;
+ Warn_On_Record_Holes := Setting;
+ Warn_On_Redundant_Constructs := Setting;
+ Warn_On_Reverse_Bit_Order := Setting;
+ Warn_On_Standard_Redefinition := Setting;
+ Warn_On_Suspicious_Contract := Setting;
+ Warn_On_Suspicious_Modulus_Value := Setting;
+ Warn_On_Unchecked_Conversion := Setting;
+ Warn_On_Unordered_Enumeration_Type := Setting;
+ Warn_On_Unrecognized_Pragma := Setting;
+ Warn_On_Unrepped_Components := Setting;
+ Warn_On_Warnings_Off := Setting;
+ end All_Warnings;
+
----------------------
-- Restore_Warnings --
----------------------
W.List_Body_Required_Info;
List_Inherited_Aspects :=
W.List_Inherited_Aspects;
+ No_Warn_On_Non_Local_Exception :=
+ W.No_Warn_On_Non_Local_Exception;
Warning_Doc_Switch :=
W.Warning_Doc_Switch;
Warn_On_Ada_2005_Compatibility :=
List_Body_Required_Info;
W.List_Inherited_Aspects :=
List_Inherited_Aspects;
+ W.No_Warn_On_Non_Local_Exception :=
+ No_Warn_On_Non_Local_Exception;
W.Warning_Doc_Switch :=
Warning_Doc_Switch;
W.Warn_On_Ada_2005_Compatibility :=
Warn_On_Unrepped_Components;
W.Warn_On_Warnings_Off :=
Warn_On_Warnings_Off;
-
return W;
end Save_Warnings;
Warning_Doc_Switch := False;
when 'e' =>
- Address_Clause_Overlay_Warnings := True;
- Check_Unreferenced := True;
- Check_Unreferenced_Formals := True;
- Check_Withs := True;
- Constant_Condition_Warnings := True;
- Elab_Warnings := True;
- Implementation_Unit_Warnings := True;
- Ineffective_Inline_Warnings := True;
- List_Body_Required_Info := True;
- List_Inherited_Aspects := True;
- Warn_On_Ada_2005_Compatibility := True;
- Warn_On_Ada_2012_Compatibility := True;
- Warn_On_All_Unread_Out_Parameters := True;
- Warn_On_Assertion_Failure := True;
- Warn_On_Assumed_Low_Bound := True;
- Warn_On_Atomic_Synchronization := True;
- Warn_On_Bad_Fixed_Value := True;
- Warn_On_Biased_Representation := True;
- Warn_On_Constant := True;
- Warn_On_Deleted_Code := True;
- Warn_On_Dereference := True;
- Warn_On_Export_Import := True;
- Warn_On_Hiding := True;
- Warn_On_Modified_Unread := True;
- Warn_On_No_Value_Assigned := True;
- Warn_On_Non_Local_Exception := True;
- Warn_On_Object_Renames_Function := True;
- Warn_On_Obsolescent_Feature := True;
- Warn_On_Overlap := True;
- Warn_On_Overridden_Size := True;
- Warn_On_Parameter_Order := True;
- Warn_On_Questionable_Missing_Parens := True;
- Warn_On_Record_Holes := True;
- Warn_On_Redundant_Constructs := True;
- Warn_On_Reverse_Bit_Order := True;
- Warn_On_Standard_Redefinition := True;
- Warn_On_Suspicious_Contract := True;
- Warn_On_Unchecked_Conversion := True;
- Warn_On_Unordered_Enumeration_Type := True;
- Warn_On_Unrecognized_Pragma := True;
- Warn_On_Unrepped_Components := True;
- Warn_On_Warnings_Off := True;
+ All_Warnings (True);
when 'g' =>
Set_GNAT_Mode_Warnings;
procedure Set_GNAT_Mode_Warnings is
begin
+ -- Set -gnatwa warnings and no others
+
+ All_Warnings (False);
+ WA_Warnings;
+
+ -- These warnings are added to the -gnatwa set
+
Address_Clause_Overlay_Warnings := True;
- Check_Unreferenced := True;
- Check_Unreferenced_Formals := True;
- Check_Withs := True;
- Constant_Condition_Warnings := True;
- Elab_Warnings := False;
+ Warn_On_Overridden_Size := True;
+
+ -- These warnings are removed from the -gnatwa set
+
Implementation_Unit_Warnings := False;
- Ineffective_Inline_Warnings := True;
- List_Body_Required_Info := False;
- List_Inherited_Aspects := False;
- Warning_Doc_Switch := False;
- Warn_On_Ada_2005_Compatibility := True;
- Warn_On_Ada_2012_Compatibility := True;
- Warn_On_All_Unread_Out_Parameters := False;
- Warn_On_Assertion_Failure := True;
- Warn_On_Assumed_Low_Bound := True;
- Warn_On_Atomic_Synchronization := False;
- Warn_On_Bad_Fixed_Value := True;
- Warn_On_Biased_Representation := True;
- Warn_On_Constant := True;
- Warn_On_Deleted_Code := False;
- Warn_On_Dereference := False;
- Warn_On_Export_Import := True;
- Warn_On_Hiding := False;
- Warn_On_Modified_Unread := True;
- Warn_On_No_Value_Assigned := True;
Warn_On_Non_Local_Exception := False;
- Warn_On_Object_Renames_Function := True;
- Warn_On_Obsolescent_Feature := True;
- Warn_On_Overlap := True;
- Warn_On_Overridden_Size := True;
- Warn_On_Parameter_Order := True;
- Warn_On_Questionable_Missing_Parens := True;
- Warn_On_Record_Holes := False;
- Warn_On_Redundant_Constructs := True;
+ No_Warn_On_Non_Local_Exception := True;
Warn_On_Reverse_Bit_Order := False;
- Warn_On_Suspicious_Contract := True;
- Warn_On_Unchecked_Conversion := True;
- Warn_On_Unordered_Enumeration_Type := False;
- Warn_On_Unrecognized_Pragma := True;
Warn_On_Unrepped_Components := False;
- Warn_On_Warnings_Off := False;
end Set_GNAT_Mode_Warnings;
------------------------
begin
case C is
when 'a' =>
- Check_Unreferenced := True;
- Check_Unreferenced_Formals := True;
- Check_Withs := True;
- Constant_Condition_Warnings := True;
- Implementation_Unit_Warnings := True;
- Ineffective_Inline_Warnings := True;
- Warn_On_Ada_2005_Compatibility := True;
- Warn_On_Ada_2012_Compatibility := True;
- Warn_On_Assertion_Failure := True;
- Warn_On_Assumed_Low_Bound := True;
- Warn_On_Bad_Fixed_Value := True;
- Warn_On_Biased_Representation := True;
- Warn_On_Constant := True;
- Warn_On_Export_Import := True;
- Warn_On_Modified_Unread := True;
- Warn_On_No_Value_Assigned := True;
- Warn_On_Non_Local_Exception := True;
- Warn_On_Object_Renames_Function := True;
- Warn_On_Obsolescent_Feature := True;
- Warn_On_Overlap := True;
- Warn_On_Parameter_Order := True;
- Warn_On_Questionable_Missing_Parens := True;
- Warn_On_Redundant_Constructs := True;
- Warn_On_Reverse_Bit_Order := True;
- Warn_On_Suspicious_Contract := True;
- Warn_On_Unchecked_Conversion := True;
- Warn_On_Unrecognized_Pragma := True;
- Warn_On_Unrepped_Components := True;
+ WA_Warnings;
when 'A' =>
- Address_Clause_Overlay_Warnings := False;
- Check_Unreferenced := False;
- Check_Unreferenced_Formals := False;
- Check_Withs := False;
- Constant_Condition_Warnings := False;
- Elab_Warnings := False;
- Implementation_Unit_Warnings := False;
- Ineffective_Inline_Warnings := False;
- List_Body_Required_Info := False;
- List_Inherited_Aspects := False;
- Warning_Doc_Switch := False;
- Warn_On_Ada_2005_Compatibility := False;
- Warn_On_Ada_2012_Compatibility := False;
- Warn_On_All_Unread_Out_Parameters := False;
- Warn_On_Assertion_Failure := False;
- Warn_On_Assumed_Low_Bound := False;
- Warn_On_Bad_Fixed_Value := False;
- Warn_On_Biased_Representation := False;
- Warn_On_Constant := False;
- Warn_On_Deleted_Code := False;
- Warn_On_Dereference := False;
- Warn_On_Export_Import := False;
- Warn_On_Hiding := False;
- Warn_On_Modified_Unread := False;
- Warn_On_No_Value_Assigned := False;
- Warn_On_Non_Local_Exception := False;
- Warn_On_Object_Renames_Function := False;
- Warn_On_Obsolescent_Feature := False;
- Warn_On_Overlap := False;
- Warn_On_Overridden_Size := False;
- Warn_On_Parameter_Order := False;
- Warn_On_Record_Holes := False;
- Warn_On_Questionable_Missing_Parens := False;
- Warn_On_Redundant_Constructs := False;
- Warn_On_Reverse_Bit_Order := False;
- Warn_On_Standard_Redefinition := False;
- Warn_On_Suspicious_Contract := False;
- Warn_On_Suspicious_Modulus_Value := False;
- Warn_On_Unchecked_Conversion := False;
- Warn_On_Unordered_Enumeration_Type := False;
- Warn_On_Unrecognized_Pragma := False;
- Warn_On_Unrepped_Components := False;
- Warn_On_Warnings_Off := False;
-
+ All_Warnings (False);
No_Warn_On_Non_Local_Exception := True;
when 'b' =>
return True;
end Set_Warning_Switch;
+ -----------------
+ -- WA_Warnings --
+ -----------------
+
+ procedure WA_Warnings is
+ begin
+ Check_Unreferenced := True;
+ Check_Unreferenced_Formals := True;
+ Check_Withs := True;
+ Constant_Condition_Warnings := True;
+ Implementation_Unit_Warnings := True;
+ Ineffective_Inline_Warnings := True;
+ Warn_On_Ada_2005_Compatibility := True;
+ Warn_On_Ada_2012_Compatibility := True;
+ Warn_On_Assertion_Failure := True;
+ Warn_On_Assumed_Low_Bound := True;
+ Warn_On_Bad_Fixed_Value := True;
+ Warn_On_Biased_Representation := True;
+ Warn_On_Constant := True;
+ Warn_On_Export_Import := True;
+ Warn_On_Modified_Unread := True;
+ Warn_On_No_Value_Assigned := True;
+ Warn_On_Non_Local_Exception := True;
+ Warn_On_Object_Renames_Function := True;
+ Warn_On_Obsolescent_Feature := True;
+ Warn_On_Overlap := True;
+ Warn_On_Parameter_Order := True;
+ Warn_On_Questionable_Missing_Parens := True;
+ Warn_On_Redundant_Constructs := True;
+ Warn_On_Reverse_Bit_Order := True;
+ Warn_On_Suspicious_Contract := True;
+ Warn_On_Unchecked_Conversion := True;
+ Warn_On_Unrecognized_Pragma := True;
+ Warn_On_Unrepped_Components := True;
+ end WA_Warnings;
+
end Warnsw;
-- --
-- S p e c --
-- --
--- Copyright (C) 1999-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 1999-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
Ineffective_Inline_Warnings : Boolean;
List_Body_Required_Info : Boolean;
List_Inherited_Aspects : Boolean;
+ No_Warn_On_Non_Local_Exception : Boolean;
Warning_Doc_Switch : Boolean;
Warn_On_Ada_2005_Compatibility : Boolean;
Warn_On_Ada_2012_Compatibility : Boolean;
Warn_On_Reverse_Bit_Order : Boolean;
Warn_On_Standard_Redefinition : Boolean;
Warn_On_Suspicious_Contract : Boolean;
+ Warn_On_Suspicious_Modulus_Value : Boolean;
Warn_On_Unchecked_Conversion : Boolean;
Warn_On_Unordered_Enumeration_Type : Boolean;
Warn_On_Unrecognized_Pragma : Boolean;