diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-09-15 10:22:54 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-09-15 10:22:54 +0000 |
commit | b3df2c07b4b2123aa0a6d5a6efe7b21cd4e7fc55 (patch) | |
tree | 02b448f73c0093fbfe3345e763787607a8a726b8 /gcc/ada/a-convec.adb | |
parent | 17e267032d97eef7cb78fcbe0fa68c86148f6fb7 (diff) | |
download | ppe42-gcc-b3df2c07b4b2123aa0a6d5a6efe7b21cd4e7fc55.tar.gz ppe42-gcc-b3df2c07b4b2123aa0a6d5a6efe7b21cd4e7fc55.zip |
2011-09-15 Robert Dewar <dewar@adacore.com>
* a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
2011-09-15 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
if the expression function is not a completion, create a
new specification for the generated declaration, and keep the
original specification in the generated body. Shorter code also
ensures that proper warnings are generated for unused formals
in all cases.
2011-09-15 Sergey Rybin <rybin@adacore.com>
* tree_io.ads: Update ASIS_Version_Number because of the changes
in the tree structures for expression functions.
2011-09-15 Arnaud Charlet <charlet@adacore.com>
* s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
(CLOCK_REALTIME): Fix wrong value on some OSes.
* s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178877 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-convec.adb')
-rw-r--r-- | gcc/ada/a-convec.adb | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/gcc/ada/a-convec.adb b/gcc/ada/a-convec.adb index 00a5404c2ba..a357cec8e89 100644 --- a/gcc/ada/a-convec.adb +++ b/gcc/ada/a-convec.adb @@ -1022,9 +1022,9 @@ package body Ada.Containers.Vectors is -- There are two constraints we need to satisfy. The first constraint is -- that a container cannot have more than Count_Type'Last elements, so - -- we must check the sum of the current length and the insertion - -- count. Note that we cannot simply add these values, because of the - -- possibility of overflow. + -- we must check the sum of the current length and the insertion count. + -- Note: we cannot simply add these values, because of the possibility + -- of overflow. if Old_Length > Count_Type'Last - Count then raise Constraint_Error with "Count is out of range"; @@ -1130,7 +1130,6 @@ package body Ada.Containers.Vectors is if Index_Type'Base'Last >= Count_Type'Pos (Count_Type'Last) then New_Last := No_Index + Index_Type'Base (New_Length); - else New_Last := Index_Type'Base (Count_Type'Base (No_Index) + New_Length); end if; @@ -1690,9 +1689,9 @@ package body Ada.Containers.Vectors is -- There are two constraints we need to satisfy. The first constraint is -- that a container cannot have more than Count_Type'Last elements, so - -- we must check the sum of the current length and the insertion - -- count. Note that we cannot simply add these values, because of the - -- possibility of overflow. + -- we must check the sum of the current length and the insertion count. + -- Note: we cannot simply add these values, because of the possibility + -- of overflow. if Old_Length > Count_Type'Last - Count then raise Constraint_Error with "Count is out of range"; |