comp.lang.ada
 help / color / mirror / Atom feed
From: "Pascal Obry" <p.obry@der.edf.fr>
Subject: Re: Ada or C++ acting 'correctly' here?
Date: 1999/03/02
Date: 1999-03-02T00:00:00+00:00	[thread overview]
Message-ID: <7bg7pi$fgf$1@cf01.edf.fr> (raw)
In-Reply-To: 7bg0pc$5a4$1@ffx2nh3.news.uu.net

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 936 bytes --]


Willliam V a �crit dans le message <7bg0pc$5a4$1@ffx2nh3.news.uu.net>...
>500000000*7 is a negative quantity.  C++ prints out
>what you ask it to do.
>try unsigned long l = 500000000*7;
>cout << l;
>or even
>cout << ((unsigned long )500000000)*7);
>If Linux 'd make the unsigned long to be 64 bit, you Ada would
>have compiled fine. So the Ada compiler you are using is
>relying very heavily on the underlying C machinery. Don't be
>too fast to blame C or C++


Certainly not. What does it means anyway that "your Ada compiler is
relying on the underlying C machinery" ????

It is just that the Ada compiler rely on the underlying architecture, how
could it be otherwise anyway !

The 32 bits or 64 bits attributes are coming from the architecture not
from the C compiler. So the only thing we know now is that a machine
word (in this example) is 32 bits.

And now again, Ada pay attention to that but C/C++ does not.

Pascal.







  parent reply	other threads:[~1999-03-02  0:00 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-27  0:00 Ada or C++ acting 'correctly' here? bill
1999-02-27  0:00 ` Matthew Heaney
1999-02-27  0:00 ` Gautier.DeMontmollin
1999-02-27  0:00 ` Florian Weimer
     [not found]   ` <36e8e201.48455851@netnews.worldnet.att.net>
1999-03-18  0:00     ` bglbv
1999-02-27  0:00 ` Claudius Proculus
1999-02-27  0:00   ` Biju Thomas
1999-02-28  0:00     ` robert_dewar
1999-02-28  0:00       ` Florian Weimer
1999-03-01  0:00         ` dewar
1999-02-27  0:00 ` Steve Doiel
1999-02-28  0:00 ` William McKenzie
1999-03-01  0:00   ` Hubert B. Keller
1999-03-01  0:00   ` fraser
1999-02-28  0:00 ` robert_dewar
1999-03-02  0:00 ` Willliam V
1999-03-02  0:00   ` robert_dewar
1999-03-02  0:00   ` SpamSpamSpam
1999-03-02  0:00   ` Pascal Obry [this message]
1999-03-02  0:00   ` Gautier.DeMontmollin
1999-03-02  0:00     ` kvisko
replies disabled

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