This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: different output from the gcc
- To: "'gcc-help at gcc dot gnu dot org'" <gcc-help at gcc dot gnu dot org>
- Subject: RE: different output from the gcc
- From: David Korn <dkorn at pixelpower dot com>
- Date: Mon, 16 Oct 2000 14:24:31 +0100
>> From: Mahadev K Cholachagudda <mahadev_kc@yahoo.com>
>> Subject: different output from the gcc
>>
>> Hello to all,
>>
>> the following program prints different outputs on the terminal.
>>
>> #include <stdio.h>
>> int main()
>> {
>> int i=10, j=20;
>> printf("%d %d");
>> return 0;
>> }
>>
>>
>> on windows nt, prints : 38076236 1627415320
>> on RH linux , prints : 20 10
>> on sun solaris , prints : 67584 -1341572
>>
>> what is the reason ?
>From: Joe Comunale [mailto:jbc@forbin.qc.edu]
>
>On Compaq Tru64 (nee DEC OSF/1 4.0E) it prints:
>536870248 536870264
On my Deathstation 9.1 it makes demons fly out of my nose. You may
perhaps have invoked some undefined behaviour?
DaveK
--
"The secret of life is honesty and fair dealing. If you can fake that,
you've got it made." -Groucho Marx