This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c/2904: printf changes order
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c/2904: printf changes order
- From: guedem at uni-freiburg dot de
- Date: 22 May 2001 20:51:36 -0000
- Reply-To: guedem at uni-freiburg dot de
>Number: 2904
>Category: c
>Synopsis: printf changes order
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue May 22 13:56:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: guedem@uni-freiburg.de
>Release: unknown-1.0
>Organization:
>Environment:
gcc version 2.95.2 19991024 (release)
i486-suse-linux
>Description:
don't know whether this is realy a bug, but printf (and fprint and fvprintf)
seems to change the order of the ouput. The following little
programm produces the out put "3, 2, 1". But I've expected to
receive "1, 2, 3".
>How-To-Repeat:
#include <stdio.h>
int main()
{
int a[] = {1, 2, 3};
int* iPtr = a;
printf("%d, %d, %d\n", *iPtr++, *iPtr++, *iPtr++);
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: