From owner-freebsd-current Sat Oct 12 08:45:46 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id IAA06193 for current-outgoing; Sat, 12 Oct 1996 08:45:46 -0700 (PDT) Received: from mail.crl.com (mail.crl.com [165.113.1.22]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id IAA06188 for ; Sat, 12 Oct 1996 08:45:43 -0700 (PDT) Received: from magigimmix.xs4all.nl by mail.crl.com with SMTP id AA06070 (5.65c/IDA-1.5 for ); Sat, 12 Oct 1996 08:46:25 -0700 Received: from asterix.xs4all.nl (asterix.xs4all.nl [194.109.6.11]) by magigimmix.xs4all.nl (8.7.5/XS4ALL) with ESMTP id RAA10091 for ; Sat, 12 Oct 1996 17:44:25 +0200 (MET DST) Received: from plm.xs4all.nl (uucp@localhost) by asterix.xs4all.nl (8.7.5/8.7.2) with UUCP id RAA13384 for freebsd-current@FreeBSD.ORG; Sat, 12 Oct 1996 17:38:02 +0200 (MET DST) Received: (from plm@localhost) by plm.xs4all.nl (8.7.5/8.7.3) id IAA26074; Sat, 12 Oct 1996 08:09:45 +0200 To: freebsd-current@FreeBSD.ORG Subject: Re: gcc's bug. please comment References: <8720f4pvel.fsf@totally-fudged-out-message-id> From: Peter Mutsaers Date: 12 Oct 1996 08:09:45 +0200 In-Reply-To: "Philippe Charnier"'s message of Fri, 11 Oct 1996 21:05:36 +0200 Message-Id: <87d8yon26u.fsf@plm.xs4all.nl> Lines: 24 X-Mailer: Gnus v5.2.39/Emacs 19.34 Sender: owner-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >> On Fri, 11 Oct 1996 21:05:36 +0200, "Philippe Charnier" >> 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 PC> #include 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