Related articles |
---|
[25 earlier articles] |
Re: Possible to write compiler to Java VM? gmckee@cloudnine.com (1996-02-02) |
Re: Possible to write compiler to Java VM? darius@phidani.be (Darius Blasband) (1996-02-04) |
Re: Possible to write compiler to Java VM? salomon@silver.cs.umanitoba.ca (1996-02-09) |
Re: Possible to write compiler to Java VM? macrakis@osf.org (1996-02-09) |
Re: Possible to write compiler to Java VM? shellgate!rgh@uu4.psi.com (Richard G. Hash) (1996-02-09) |
Re: Possible to write compiler to Java VM? gmckee@cloudnine.com (1996-02-12) |
Re: Possible to write compiler to Java VM? ncohen@watson.ibm.com (1996-02-13) |
Re: Possible to write compiler to Java VM? wwgrol@pseserv3.fw.hac.com (W. Wesley Groleau (Wes)) (1997-01-02) |
From: | ncohen@watson.ibm.com (Norman H. Cohen) |
Newsgroups: | comp.lang.java,comp.compilers,comp.lang.ada |
Date: | 13 Feb 1996 00:20:56 -0500 |
Organization: | IBM T.J. Watson Research Center |
References: | 96-01-037 96-02-051 96-02-082 |
Keywords: | C, design |
macrakis@osf.org (Stavros Macrakis) writes:
|> There are some unsafe features in Ada other than the explicit ones.
|> For instance, aliasing is "erroneous" (thus allowing efficient
|> Fortran-style optimization of array code in subroutines), but no
|> runtime checking is required.
Not quite. Aliasing in itself has never been erroneous. In Ada 83,
forms of aliasing that caused the effect of a call to depend on the
parameter-passing mechanism were erroneous. In Ada 95, such aliasing
is no longer "erroneous"--meaning that the subsequent behavior of the
computation is undefined--but a "bounded error"--meaning the behavior
must be either that resulting from call-by-reference or that resulting
from copy-in-copy-out.
Uninitialized variables are a better example of a safety breach that
can occur even in an Ada program that does not explicitly use unsafe
features. The Normalize_Scalars pragma in the Ada-95 Safety and
Security annex is designed to increase the likelihood that an
uninitialized variable will raise the exception Constraint_Error
rather than corrupting the computation in unpredictable ways, so that
such errors can be smoked out during testing.
--
Norman H. Cohen ncohen@watson.ibm.com
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.