comp.lang.ada
 help / color / mirror / Atom feed
From: James Rogers <jimmaureenrogers@worldnet.att.net>
Subject: Re: type Foo_ptr in new void*;
Date: Mon, 30 Jul 2001 03:10:18 GMT
Date: 2001-07-30T03:10:18+00:00	[thread overview]
Message-ID: <3B64D0B0.33323E3B@worldnet.att.net> (raw)
In-Reply-To: 3B64C812.8CA53003@home.com

"Warren W. Gay VE3WWG" wrote:
> 
> I don't think your "unspecified behavior" assertion is truly fair here.
> I believe that when you reach a point in the C/C++ compile where
> pointer arithmetic is required on the "undefined type", you will get
> a compile error. The compiler will not generate code that does
> "undefined behaviour" here. If there is any further doubt about it,
> I am sure this can be tested with a short example program.

Your assertion may be true for C++ compilers, but it was not true
for C compilers in the early 1990s.

> Ada does permit you to define an incomplete type as well, but the
> condition is that it must be defined eventually. I agree that enforcing
> its later definition, is a good thing.

Let's be a little more precise here. Ada does not allow you to define
incomplete types. It allows you to define unconstrained types.
There is a real difference. All Ada objects are fully defined.
You cannot make an unconstrained instance of an unconstrained type.

Jim Rogers
Colorado Springs, Colorado USA



  reply	other threads:[~2001-07-30  3:10 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-29  4:31 type Foo_ptr in new void*; Tomasz Wegrzanowski
2001-07-29  5:56 ` tmoran
2001-07-29  8:57   ` Tomasz Wegrzanowski
2001-07-29 12:26     ` Marc A. Criley
2001-07-30  1:05       ` Tomasz Wegrzanowski
2001-07-30  1:20         ` tmoran
2001-07-30  2:09         ` James Rogers
2001-07-30  2:36           ` Warren W. Gay VE3WWG
2001-07-30  3:10             ` James Rogers [this message]
2001-07-31  2:14               ` Warren W. Gay VE3WWG
2001-07-31  1:21           ` Tomasz Wegrzanowski
2001-07-31  3:06             ` James Rogers
2001-07-31  5:02               ` Warren W. Gay VE3WWG
2001-07-31  7:22               ` Florian Weimer
2001-07-31  4:56           ` Darren New
2001-08-04  6:05             ` David Thompson
2001-08-05  2:27               ` Warren W. Gay VE3WWG
2001-07-29 13:40     ` Dale Stanbrough
2001-07-29 14:12 ` Florian Weimer
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox