summaryrefslogtreecommitdiff
path: root/gcc/ada/warnsw.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-02 12:48:37 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-02 12:48:37 +0000
commitf42f24d746366aa603485df7cfb2cd7a5ec635eb (patch)
treec6e6b59ced72e2b75ef882519a53e462c94ac52b /gcc/ada/warnsw.ads
parentac1200d2017e5af11b6c040a3d148d1d9e7d1d07 (diff)
downloadgcc-f42f24d746366aa603485df7cfb2cd7a5ec635eb.tar.gz
2011-08-02 Javier Miranda <miranda@adacore.com>
* sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals associated with anonymous access to subprograms. 2011-08-02 Geert Bosch <bosch@adacore.com> * opt.ads (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions. (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition. * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads (Add_Symbol_Definition): Move to switch-c.adb (Process_Command_Line_Symbol_Definitions): Adjust references to above. * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation. (Add_Symbol_Definition): Move to switch-c.adb. * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw. * sem_warn.adb (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch): Move to warnsw.adb. * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size, Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch): Move to warnsw.adb. * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw. (Add_Symbol_Definition): Moved from Prepcomp. * switch-c.ads: Update copyright notice. Use String_List instead of Argument_List, removing dependency on System.OS_Lib. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177140 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/warnsw.ads')
-rw-r--r--gcc/ada/warnsw.ads70
1 files changed, 70 insertions, 0 deletions
diff --git a/gcc/ada/warnsw.ads b/gcc/ada/warnsw.ads
new file mode 100644
index 00000000000..1aa34929427
--- /dev/null
+++ b/gcc/ada/warnsw.ads
@@ -0,0 +1,70 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT COMPILER COMPONENTS --
+-- --
+-- W A R N S W --
+-- --
+-- S p e c --
+-- --
+-- Copyright (C) 1999-2010, 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- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
+-- for more details. You should have received a copy of the GNU General --
+-- Public License distributed with GNAT; see file COPYING3. If not, go to --
+-- http://www.gnu.org/licenses for a complete copy of the license. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+-- This unit contains the routines used to handle setting of warning options.
+
+package Warnsw is
+
+ -------------------
+ -- Warning Flags --
+ -------------------
+
+ -- These flags are activated or deactivated by -gnatw switches and control
+ -- whether warnings of a given class will be generated or not.
+
+ -- Note: most of these flags are still in opt, but the plan is to move them
+ -- here as time goes by.
+
+ Warn_On_Record_Holes : Boolean := False;
+ -- Warn when explicit record component clauses leave uncovered holes (gaps)
+ -- in a record layout. Off by default, set by -gnatw.h (but not -gnatwa).
+
+ Warn_On_Overridden_Size : Boolean := False;
+ -- Warn when explicit record component clause or array component_size
+ -- clause specifies a size that overrides a size for the typen which was
+ -- set with an explicit size clause. Off by default, set by -gnatw.s (but
+ -- not -gnatwa).
+
+ -----------------
+ -- Subprograms --
+ -----------------
+
+ function Set_Warning_Switch (C : Character) return Boolean;
+ -- This function sets the warning switch or switches corresponding to the
+ -- given character. It is used to process a -gnatw switch on the command
+ -- line, or a character in a string literal in pragma Warnings. Returns
+ -- True for valid warning character C, False for invalid character.
+
+ function Set_Dot_Warning_Switch (C : Character) return Boolean;
+ -- This function sets the warning switch or switches corresponding to the
+ -- given character preceded by a dot. Used to process a -gnatw. switch on
+ -- the command line or .C in a string literal in pragma Warnings. Returns
+ -- True for valid warning character C, False for invalid character.
+
+ 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.
+
+end Warnsw;