summaryrefslogtreecommitdiffstats
path: root/gcc/ada/g-mbdira.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-22 17:17:57 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-22 17:17:57 +0000
commit1473b207ced691551e6d534710e14193a555323f (patch)
tree6078bcaac066b9b80d5acf54d2737daa1f56b9ed /gcc/ada/g-mbdira.adb
parentcd5e5c04568f2b4704a48818a5f3667b9e90daca (diff)
downloadppe42-gcc-1473b207ced691551e6d534710e14193a555323f.tar.gz
ppe42-gcc-1473b207ced691551e6d534710e14193a555323f.zip
2010-06-22 Robert Dewar <dewar@adacore.com>
* freeze.adb: Minor reformatting Minor code reorganization (use Nkind_In and Ekind_In). 2010-06-22 Bob Duff <duff@adacore.com> * gnat1drv.adb (Gnat1drv): Remove the messages that recommend using -gnatc when a file is compiled that we cannot generate code for, not helpful and confusing. 2010-06-22 Vincent Celier <celier@adacore.com> * switch-m.adb (Normalize_Compiler_Switches): Process correctly switches -gnatknn. 2010-06-22 Paul Hilfinger <hilfinger@adacore.com> * s-rannum.adb: Replace constants with commented symbols. * s-rannum.ads: Explain significance of the initial value of the data structure. 2010-06-22 Ed Schonberg <schonberg@adacore.com> * a-ngcoty.adb: Clarify comment. 2010-06-22 Gary Dismukes <dismukes@adacore.com> * exp_pakd.adb (Expand_Bit_Packed_Element_Set): Return without expansion for indexing packed arrays with small power-of-2 component sizes when the target is AAMP. (Expand_Packed_Element_Reference): Return without expansion for indexing packed arrays with small power-of-2 component sizes when the target is AAMP. 2010-06-22 Geert Bosch <bosch@adacore.com> * exp_ch4.adb (Expand_N_In): Do not substitute a valid check for X in Float'Range. 2010-06-22 Robert Dewar <dewar@adacore.com> * g-mbdira.adb, g-mbflra.adb, a-nuflra.adb, a-nudira.adb: Minor comment updates. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161213 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/g-mbdira.adb')
-rw-r--r--gcc/ada/g-mbdira.adb9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/ada/g-mbdira.adb b/gcc/ada/g-mbdira.adb
index 27344dc454d..e7e1c470d67 100644
--- a/gcc/ada/g-mbdira.adb
+++ b/gcc/ada/g-mbdira.adb
@@ -39,13 +39,14 @@ package body GNAT.MBBS_Discrete_Random is
-- Implementation Note --
-------------------------
- -- The design of this spec is very awkward, as a result of Ada 95 not
+ -- The design of this spec is a bit awkward, as a result of Ada 95 not
-- permitting in-out parameters for function formals (most naturally
-- Generator values would be passed this way). In pure Ada 95, the only
- -- solution is to use the heap and pointers, and, to avoid memory leaks,
- -- controlled types.
+ -- solution would be to add a self-referential component to the generator
+ -- allowing access to the generator object from inside the function. This
+ -- would work because the generator is limited, which prevents any copy.
- -- This is awfully heavy, so what we do is to use Unrestricted_Access to
+ -- This is a bit heavy, so what we do is to use Unrestricted_Access to
-- get a pointer to the state in the passed Generator. This works because
-- Generator is a limited type and will thus always be passed by reference.
OpenPOWER on IntegriCloud