This patch changes the default from -gnatw.l to -gnatw.L. That is, inherited aspects are no longer listed by default.
Tested on x86_64-pc-linux-gnu, committed on trunk 2011-12-20 Bob Duff <d...@adacore.com> * opt.ads (List_Inherited_Aspects): Default to False (i.e. -gnatw.L is the default). * usage.adb: Document new default for -gnatw.L. * gnat_ugn.texi: Document -gnatw.l and -gnatw.L switches. * warnsw.adb (Set_Warning_Switch): Do not include List_Inherited_Aspects in -gnatwa.
Index: usage.adb =================================================================== --- usage.adb (revision 182532) +++ usage.adb (working copy) @@ -453,8 +453,8 @@ "elaboration pragma"); Write_Line (" L* turn off warnings for missing " & "elaboration pragma"); - Write_Line (" .l* turn on info messages for inherited aspects"); - Write_Line (" .L turn off info messages for inherited aspects"); + Write_Line (" .l turn on info messages for inherited aspects"); + Write_Line (" .L* turn off info messages for inherited aspects"); Write_Line (" m+ turn on warnings for variable assigned " & "but not read"); Write_Line (" M* turn off warnings for variable assigned " & Index: gnat_ugn.texi =================================================================== --- gnat_ugn.texi (revision 182532) +++ gnat_ugn.texi (working copy) @@ -5093,6 +5093,7 @@ @option{-gnatwh} (hiding), @option{-gnatw.h} (holes (gaps) in record layouts) @option{-gnatwl} (elaboration warnings), +@option{-gnatw.l} (inherited aspects), @option{-gnatw.o} (warn on values set by out parameters ignored) and @option{-gnatwt} (tracking of deleted conditional code). All other optional warnings are turned on. @@ -5424,6 +5425,19 @@ See the section in this guide on elaboration checking for details on when such pragmas should be used. +@item -gnatw.l +@emph{List inherited aspects.} +@cindex @option{-gnatw.l} (@command{gcc}) +This switch causes the compiler to list inherited invariants, +preconditions, and postconditions from Invariant'Class, Pre'Class, and +Post'Class aspects. Also list inherited subtype predicates. +These messages are not automatically turned on by the use of @option{-gnatwa}. + +@item -gnatw.L +@emph{Suppress listing of inherited aspects.} +@cindex @option{-gnatw.L} (@command{gcc}) +This switch suppresses listing of inherited aspects. + @item -gnatwm @emph{Activate warnings on modified but unreferenced variables.} @cindex @option{-gnatwm} (@command{gcc}) Index: warnsw.adb =================================================================== --- warnsw.adb (revision 182532) +++ warnsw.adb (working copy) @@ -251,7 +251,6 @@ Constant_Condition_Warnings := True; Implementation_Unit_Warnings := True; Ineffective_Inline_Warnings := True; - List_Inherited_Aspects := True; Warn_On_Ada_2005_Compatibility := True; Warn_On_Ada_2012_Compatibility := True; Warn_On_Assertion_Failure := True; Index: opt.ads =================================================================== --- opt.ads (revision 182532) +++ opt.ads (working copy) @@ -801,10 +801,12 @@ -- Set to True to skip compile and bind steps (except when Bind_Only is -- set to True). - List_Inherited_Aspects : Boolean := True; + List_Inherited_Aspects : Boolean := False; -- GNAT -- List inherited invariants, preconditions, and postconditions from - -- Invariant'Class, Pre'Class, and Post'Class aspects. + -- Invariant'Class, Pre'Class, and Post'Class aspects. Also list inherited + -- subtype predicates. Set True by use of -gnatw.l and False by use of + -- -gnatw.L. List_Restrictions : Boolean := False; -- GNATBIND