Date: 12 Oct 1996 08:09:45 +0200 From: Peter Mutsaers <plm@xs4all.nl> To: freebsd-current@FreeBSD.ORG Subject: Re: gcc's bug. please comment Message-ID: <87d8yon26u.fsf@plm.xs4all.nl> In-Reply-To: "Philippe Charnier"'s message of Fri, 11 Oct 1996 21:05:36 %2B0200 References: <8720f4pvel.fsf@totally-fudged-out-message-id>
index | next in thread | previous in thread | raw e-mail
>> On Fri, 11 Oct 1996 21:05:36 +0200, "Philippe Charnier"
>> <charnier@xp11.frmug.org> said:
PC> The output should be `1 2' but it is `2 1' on i386 computers.
PC> Here is the code:
PC> - ----------mypb2.c-----------------
PC> #include <stdio.h>
PC> #include <stdlib.h>
PC> main()
PC> { FILE *fic;
PC> int a[2][50], i = 0;
PC> fic=fopen("mypb2.csv","r");
PC> fscanf(fic, "%d;%d", &a[1][i++], &a[1][i++]);
You must never use a pre/post increment operator twice in one
expression. The order of evaluation of function parameters is
undefined, thus the answer is undefined. It is not a bug.
--
Peter Mutsaers | Abcoude (Utrecht), | Trust is a good quality
plm@xs4all.nl | the Netherlands | for other people to have
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87d8yon26u.fsf>
