Is this a bug of the compiler?
From: John (johncrane_at_yahoo.com)
Date: 06/30/04
- Next message: Julie: "Re: Std 1.3 "Terms et definitions""
- Previous message: Julie: "Re: Swapping Bull***"
- Next in thread: Conrad Weyns: "Re: Is this a bug of the compiler?"
- Reply: Conrad Weyns: "Re: Is this a bug of the compiler?"
- Reply: marbac: "Re: Is this a bug of the compiler?"
- Reply: Rob Williscroft: "Re: Is this a bug of the compiler?"
- Reply: Default User: "Re: Is this a bug of the compiler?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 30 Jun 2004 08:55:00 -0700
The following code:
-------------------------------------
#include <stdio.h>
int a=10
main()
{ printf("a=%d a++=%d ++a=%d \n",a, a++,++a);
return 0;
}
------------------------------------
When using gcc, the output is:
a=12 a++=10 ++a=12
When using VC++, the output is:
a=11 a++=11 ++a=11
None of them seems reasonable.
Can anybody give a pointer on this?
- Next message: Julie: "Re: Std 1.3 "Terms et definitions""
- Previous message: Julie: "Re: Swapping Bull***"
- Next in thread: Conrad Weyns: "Re: Is this a bug of the compiler?"
- Reply: Conrad Weyns: "Re: Is this a bug of the compiler?"
- Reply: marbac: "Re: Is this a bug of the compiler?"
- Reply: Rob Williscroft: "Re: Is this a bug of the compiler?"
- Reply: Default User: "Re: Is this a bug of the compiler?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]