public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] Minor adjustments to -gnatg warnings
@ 2011-10-24 11:06 Arnaud Charlet
  0 siblings, 0 replies; only message in thread
From: Arnaud Charlet @ 2011-10-24 11:06 UTC (permalink / raw)
  To: gcc-patches; +Cc: Robert Dewar

[-- Attachment #1: Type: text/plain, Size: 527 bytes --]

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  <dewar@adacore.com>

	* warnsw.adb: Add some missing warnings to Set_GNAT_Mode_Warnings
	* warnsw.ads: Add comments to Set_GNAT_Mode_Warnings


[-- Attachment #2: difs --]
[-- Type: text/plain, Size: 2504 bytes --]

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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-10-24  9:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-24 11:06 [Ada] Minor adjustments to -gnatg warnings Arnaud Charlet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).