summaryrefslogtreecommitdiff
path: root/gcc/ada/checks.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-23 06:31:57 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-23 06:31:57 +0000
commit9116df93caf54602aeac10557553ba5e52c39cb3 (patch)
tree894847d28e65a7dd99ebd10c39fd1215e393b7d1 /gcc/ada/checks.adb
parentc8da6114f2d7cdca5368f9bdcc3227a21b3fd7a2 (diff)
downloadgcc-9116df93caf54602aeac10557553ba5e52c39cb3.tar.gz
2010-06-23 Jose Ruiz <ruiz@adacore.com>
* a-reatim.adb, a-retide.adb: Move the initialization of the tasking run time from Ada.Real_Time.Delays to Ada.Real_Time. This way, calls to Clock (without delays) use a run time which is properly initialized. 2010-06-23 Vincent Celier <celier@adacore.com> * make.adb: Do not set Check_Readonly_Files when setting Must_Compile, when -f -u and a main is specified on the command line. However, attempt to compile even when the ALI file is read-only when Must_Compile is True. 2010-06-23 Thomas Quinot <quinot@adacore.com> * checks.adb, g-pehage.adb, cstand.adb: Minor code factorization. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161248 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/checks.adb')
-rw-r--r--gcc/ada/checks.adb42
1 files changed, 20 insertions, 22 deletions
diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb
index 9261a279882..59270e875a9 100644
--- a/gcc/ada/checks.adb
+++ b/gcc/ada/checks.adb
@@ -3351,7 +3351,7 @@ package body Checks is
Indx := Next_Index (Indx);
end loop;
- -- if The index type is a formal type, or derived from
+ -- If the index type is a formal type or derived from
-- one, the bounds are not static.
if Is_Generic_Type (Root_Type (Etype (Indx))) then
@@ -3378,8 +3378,8 @@ package body Checks is
-- For constrained arrays, the minimum value for
-- Length is taken from the actual value of the
- -- bounds, since the index will be exactly of
- -- this subtype.
+ -- bounds, since the index will be exactly of this
+ -- subtype.
if Is_Constrained (Atyp) then
Lor := UI_Max (Uint_0, UL - LU + 1);
@@ -3395,7 +3395,7 @@ package body Checks is
end;
-- No special handling for other attributes
- -- Probably more opportunities exist here ???
+ -- Probably more opportunities exist here???
when others =>
OK1 := False;
@@ -3416,33 +3416,31 @@ package body Checks is
Hir := No_Uint;
end case;
- -- At this stage, if OK1 is true, then we know that the actual
- -- result of the computed expression is in the range Lor .. Hir.
- -- We can use this to restrict the possible range of results.
+ -- At this stage, if OK1 is true, then we know that the actual result of
+ -- the computed expression is in the range Lor .. Hir. We can use this
+ -- to restrict the possible range of results.
if OK1 then
- -- If the refined value of the low bound is greater than the
- -- type high bound, then reset it to the more restrictive
- -- value. However, we do NOT do this for the case of a modular
- -- type where the possible upper bound on the value is above the
- -- base type high bound, because that means the result could wrap.
+ -- If the refined value of the low bound is greater than the type
+ -- high bound, then reset it to the more restrictive value. However,
+ -- we do NOT do this for the case of a modular type where the
+ -- possible upper bound on the value is above the base type high
+ -- bound, because that means the result could wrap.
if Lor > Lo
- and then not (Is_Modular_Integer_Type (Typ)
- and then Hir > Hbound)
+ and then not (Is_Modular_Integer_Type (Typ) and then Hir > Hbound)
then
Lo := Lor;
end if;
- -- Similarly, if the refined value of the high bound is less
- -- than the value so far, then reset it to the more restrictive
- -- value. Again, we do not do this if the refined low bound is
- -- negative for a modular type, since this would wrap.
+ -- Similarly, if the refined value of the high bound is less than the
+ -- value so far, then reset it to the more restrictive value. Again,
+ -- we do not do this if the refined low bound is negative for a
+ -- modular type, since this would wrap.
if Hir < Hi
- and then not (Is_Modular_Integer_Type (Typ)
- and then Lor < Uint_0)
+ and then not (Is_Modular_Integer_Type (Typ) and then Lor < Uint_0)
then
Hi := Hir;
end if;
@@ -3456,8 +3454,8 @@ package body Checks is
Determine_Range_Cache_Hi (Cindex) := Hi;
return;
- -- If any exception occurs, it means that we have some bug in the compiler
- -- possibly triggered by a previous error, or by some unforseen peculiar
+ -- If any exception occurs, it means that we have some bug in the compiler,
+ -- possibly triggered by a previous error, or by some unforeseen peculiar
-- occurrence. However, this is only an optimization attempt, so there is
-- really no point in crashing the compiler. Instead we just decide, too
-- bad, we can't figure out a range in this case after all.