From: Keith Thompson <kst-u@mib.org>
Subject: Re: old problem
Date: Thu, 30 May 2019 18:04:39 -0700
Date: 2019-05-30T18:04:39-07:00 [thread overview]
Message-ID: <lnk1e7qvrs.fsf@kst-u.example.com> (raw)
In-Reply-To: 6df29358-0e30-4478-9473-6580d5cb555c@googlegroups.com
Gilbert Gosseyn <hnptz@yahoo.de> writes:
> with Ada.Numerics; use Ada.Numerics;
> with Ada.Numerics.Generic_Real_Arrays;
> package allx is
> type Real is digits 18;
> package RA is new Ada.Numerics.Generic_Real_Arrays(Real);
> use RA;
> Dx,Dy,gK : Positive;
> subtype RM is Real_Matrix(1..Dy,1..Dx);
> type weight_array is array(1..gK) of RM;
> end allx;
[...]
Dy and Dx are uninitialized when Real_Matrix is defined. Their values
will be arbitrary garbage when the declaration of RM is elaborated.
(I'm a bit surprised you didn't get a compile-time warning.)
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Will write code for food.
void Void(void) { Void(); } /* The recursive call of the void */
next prev parent reply other threads:[~2019-05-31 1:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-30 10:26 old problem Gilbert Gosseyn
2019-05-30 17:08 ` Anh Vo
2019-05-31 1:04 ` Keith Thompson [this message]
2019-05-31 12:37 ` Simon Wright
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox