gcc -v reports: Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/specs Configured with: /netrel/src/gcc-3.3.1-2/configure --enable-languages=c,c++,f77, java --enable-libgcj --enable-threads=posix --with-system-zlib --enable-nls --wi thout-included-gettext --enable-interpreter --enable-sjlj-exceptions --disable-v ersion-specific-runtime-libs --enable-shared --build=i686-pc-linux --host=i686-p c-cygwin --target=i686-pc-cygwin --prefix=/usr --exec-prefix=/usr --sysconfdir=/ etc --libdir=/usr/lib --includedir=/nonexistent/include --libexecdir=/usr/sbin Thread model: posix gcc version 3.3.1 (cygming special) The program is: #include <stdio.h> void foo( char c1, char c2, char c3 ) { printf( "%c%c%c\n", c1, c2, c3 ); } int main( int argc, char **argv ) { int i = 0; char a[] = "abc"; char *pc = a; foo( a[i++], a[i++], a[i++] ); foo( *pc++, *pc++, *pc++ ); i = 0; pc = a; foo( a[i++], a[i++], a[i] ); foo( *pc++, *pc++, *pc ); return 0; } The output is: cba cba baa baa When I would expect (and I got with gcc 2.95.2 under Solaris 9!): abc abc abc abc
Order of execution is undefined in this case.
That's a duplicate of...
...PR 11751. *** This bug has been marked as a duplicate of 11751 ***