Part of work for KA07-013 This patch adds a couple of missing warnings to the set of warnings that are activated by -gnatw.g or -gnatg. This affects only internal builds, so no test is required. The necessary adjustments to front-end sources to avoid triggering these new warnings have already been made.
Tested on x86_64-pc-linux-gnu, committed on trunk 2011-10-24 Robert Dewar <de...@adacore.com> * warnsw.adb: Add some missing warnings to Set_GNAT_Mode_Warnings * warnsw.ads: Add comments to Set_GNAT_Mode_Warnings
Index: warnsw.adb =================================================================== --- warnsw.adb (revision 180365) +++ warnsw.adb (working copy) @@ -212,12 +212,16 @@ Warn_On_Modified_Unread := True; Warn_On_No_Value_Assigned := True; Warn_On_Non_Local_Exception := False; - Warn_On_Object_Renames_Function := 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; Warn_On_Reverse_Bit_Order := False; - Warn_On_Object_Renames_Function := True; + Warn_On_Suspicious_Contract := True; Warn_On_Unchecked_Conversion := True; Warn_On_Unordered_Enumeration_Type := False; Warn_On_Unrecognized_Pragma := True; Index: warnsw.ads =================================================================== --- warnsw.ads (revision 180365) +++ warnsw.ads (working copy) @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1999-2010, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-2011, 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- -- @@ -65,6 +65,10 @@ procedure Set_GNAT_Mode_Warnings; -- This is called in -gnatg mode to set the warnings for gnat mode. It is - -- also used to set the proper warning statuses for -gnatw.g. + -- also used to set the proper warning statuses for -gnatw.g. Note that + -- this set of warnings is disjoint from -gnatwa, it enables warnings that + -- are not included in -gnatwa, and it disables warnings that are included + -- in -gnatwa (such as Warn_On_Implementation_Units, which we clearly want + -- to be False for units built with -gnatg). end Warnsw;