summaryrefslogtreecommitdiff
path: root/gcc/ada/checks.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-22 15:07:34 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-22 15:07:34 +0000
commitc9e9428acdb5f84c9c0e7b47bb56d88033f0e706 (patch)
tree39eeab666d9c9d481fdac0dc571c6f231d614fab /gcc/ada/checks.adb
parent68e249dbfaec88c87d410233adf6332fddfb840b (diff)
downloadgcc-c9e9428acdb5f84c9c0e7b47bb56d88033f0e706.tar.gz
2008-08-22 Robert Dewar <dewar@adacore.com>
* checks.adb (Determine_Range): Deal with values that might be invalid * opt.adb, opt.ads (Assume_No_Invalid_Values[_Config]): New configuration switches. * par-prag.adb: Dummy entry for pragma Assume_No_Invalid_Values * sem_prag.adb: Implement pragma Assume_No_Default_Values * snames.adb, snames.ads, snames.h: Add entries for pragma Assume_No_Invalid_Values * switch-c.adb: Add processing for -gnatB switch * usage.adb: Add entry for flag -gnatB (no bad invalid values) git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139484 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/checks.adb')
-rw-r--r--gcc/ada/checks.adb5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb
index 5dac9262e03..12c5b64a9fc 100644
--- a/gcc/ada/checks.adb
+++ b/gcc/ada/checks.adb
@@ -3125,10 +3125,9 @@ package body Checks is
-- First step, change to use base type if the expression is an entity
-- which we do not know is valid.
- -- For now, we do not do this
-
- if False and then Is_Entity_Name (N)
+ if Is_Entity_Name (N)
and then not Is_Known_Valid (Entity (N))
+ and then not Assume_No_Invalid_Values
then
Typ := Base_Type (Typ);
end if;