Mailinglist Archive: opensuse-programming (61 mails)

< Previous Next >
system-dependent behaviour
  • From: "Verdi March" <cincaipatron@xxxxxxx>
  • Date: Sat, 10 Sep 2005 08:35:12 +0200 (MEST)
  • Message-id: <12929.1126334112@xxxxxxxxxxxxx>
Hi,

Just want to confirm that the following statements is
'dangerous', in the sense that it's system dependant.
I recall to read somewhere there're additional case
where this can happen, such as dofun(s, s++).

Any insight on why it happens is highly appreciated.

Here's the program:
int main(void) {
   int s=3;
   printf("s=%i,s=%i,s=%i\n",s,s++,s--);
   return 0;
}

For the result, I got s=3,s=2,s=3 on SuSE 9.3, but
on a Solaris machine, I got s=3,s=3,s=4.


Regards,
Verdi


--
5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
+++ GMX - die erste Adresse für Mail, Message, More +++

< Previous Next >