comp.lang.ada
 help / color / mirror / Atom feed
* Are there any "bad" Ada constructs?
@ 1996-09-04  0:00 Gordon Dodrill
  1996-09-05  0:00 ` Dennison
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Gordon Dodrill @ 1996-09-04  0:00 UTC (permalink / raw)



The C and C++ language have several constructs that are undefined enough
that two conforming compilers are permitted to give different results and
still be correct.  One example is,

   i = 2;
   a[i] = i++;

Executing the second of these two statements, assuming they are properly 
declared first, a compiler is permitted to assign the value of 2 to either
a[2] or a[3] and be correct.  This construct is stated to be undefined by
the ANSI-C standard, and any compiler can actually do anything it pleases.
I saw one reference that stated there are 150 of these sorts of things in
C and C++.

My question is: Are there any constructs in Ada that are permitted to do
    two or more different things and still be correct, in a manner that
    is similar to that listed above?

Thanks,

Gordon

//       Coronado Enterprises Tutorials - Ada, C, C++, Pascal
//              Learn to program in a modern language
//         All are available at http://www.swcp.com/~dodrill
//                 Gordon Dodrill - dodrill@swcp.com





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1996-09-16  0:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-09-04  0:00 Are there any "bad" Ada constructs? Gordon Dodrill
1996-09-05  0:00 ` Dennison
1996-09-05  0:00 ` Jerome Desquilbet
1996-09-05  0:00 ` Peter Amey
1996-09-16  0:00   ` George Haddad

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