This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
wierd results
- To: egcs-bugs at egcs dot cygnus dot com
- Subject: wierd results
- From: george josilo <josilo at lucent dot com>
- Date: Fri, 17 Mar 2000 16:25:09 -0500
I seem to get wierd results when i do:
main()
{
int a=0;
printf("%d %d %d %d\n", a, ++a, ++a, a);
}
most other compilers (MS), SparcWorks,
give: 2 2 1 0 (evaluation in reverse order)
gcc(v2.7.2, v2.8.1)
give 2 1 2 2
am I missing something?
--
____________________________________________________________________
ŠorŠe Josilo - mailto:josilo@lucent.com | ZAP ''''
WaveStar BandWidth Manager, Lucent Technologies | COM\ .., |
(Office)732-332-6681 (Fax)732-949-5040 (Room)HO/3C338A | ICS @_ |
| | |