summaryrefslogtreecommitdiff
path: root/gcc/ada/err_vars.ads
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-30 14:35:22 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-30 14:35:22 +0000
commit14ca6b9a43667a683654cd0fc87ba548d0b3661c (patch)
treeb930499490b07e1c897cdfe8e6d50538aecc8f2b /gcc/ada/err_vars.ads
parent4b673aa1dde655e1d89d31e583168d5831f32819 (diff)
downloadgcc-14ca6b9a43667a683654cd0fc87ba548d0b3661c.tar.gz
* Makefile.in (dce.o): Add $(EXCEPT_H).
* dce.c: Include except.h and delete redundant vector definitions. (deletable_insn_p): Return false for non-call insns that can throw if DF is running. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147002 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/err_vars.ads')
-rw-r--r--gcc/ada/err_vars.ads19
1 files changed, 13 insertions, 6 deletions
diff --git a/gcc/ada/err_vars.ads b/gcc/ada/err_vars.ads
index 58fca616385..c4c28dafc36 100644
--- a/gcc/ada/err_vars.ads
+++ b/gcc/ada/err_vars.ads
@@ -32,24 +32,31 @@ with Uintp; use Uintp;
package Err_Vars is
+ -- All of these variables are set when needed, so they do not need to be
+ -- initialized. However, there is code that saves and restores existing
+ -- values, which may malfunction in -gnatVa mode if the variable has never
+ -- been iniitalized, so we initialize some variables to avoid exceptions
+ -- from invalid values in such cases.
+
------------------
-- Error Counts --
------------------
- Serious_Errors_Detected : Nat;
+ Serious_Errors_Detected : Nat := 0;
-- This is a count of errors that are serious enough to stop expansion,
-- and hence to prevent generation of an object file even if the
-- switch -gnatQ is set. Initialized to zero at the start of compilation.
+ -- Initialized for -gnatVa use, see comment above.
- Total_Errors_Detected : Nat;
+ Total_Errors_Detected : Nat := 0;
-- Number of errors detected so far. Includes count of serious errors and
-- non-serious errors, so this value is always greater than or equal to the
-- Serious_Errors_Detected value. Initialized to zero at the start of
- -- compilation.
+ -- compilation. Initialized for -gnatVa use, see comment above.
- Warnings_Detected : Nat;
+ Warnings_Detected : Nat := 0;
-- Number of warnings detected. Initialized to zero at the start of
- -- compilation.
+ -- compilation. Initialized for -gnatVa use, see comment above.
----------------------------------
-- Error Message Mode Variables --
@@ -75,7 +82,7 @@ package Err_Vars is
-- generated on the instantiation (referring to the template) rather
-- than on the template itself.
- Raise_Exception_On_Error : Nat;
+ Raise_Exception_On_Error : Nat := 0;
-- If this value is non-zero, then any attempt to generate an error
-- message raises the exception Error_Msg_Exception, and the error
-- message is not output. This is used for defending against junk