public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/17018] New: address increment of function parameters changes their order
@ 2004-08-13 14:36 svetozarmarkov at netscape dot net
  2004-08-13 14:41 ` [Bug c/17018] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: svetozarmarkov at netscape dot net @ 2004-08-13 14:36 UTC (permalink / raw)
  To: gcc-bugs

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

-- 
           Summary: address increment of function parameters changes their
                    order
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: svetozarmarkov at netscape dot net
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17018


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/17018] address increment of function parameters changes their order
  2004-08-13 14:36 [Bug c/17018] New: address increment of function parameters changes their order svetozarmarkov at netscape dot net
@ 2004-08-13 14:41 ` pinskia at gcc dot gnu dot org
  2004-08-13 15:40 ` bangerth at dealii dot org
  2004-08-13 15:40 ` bangerth at dealii dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-13 14:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-08-13 14:41 -------
Order of execution is undefined in this case.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17018


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/17018] address increment of function parameters changes their order
  2004-08-13 14:36 [Bug c/17018] New: address increment of function parameters changes their order svetozarmarkov at netscape dot net
  2004-08-13 14:41 ` [Bug c/17018] " pinskia at gcc dot gnu dot org
@ 2004-08-13 15:40 ` bangerth at dealii dot org
  2004-08-13 15:40 ` bangerth at dealii dot org
  2 siblings, 0 replies; 4+ messages in thread
From: bangerth at dealii dot org @ 2004-08-13 15:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-08-13 15:40 -------
...PR 11751. 

*** This bug has been marked as a duplicate of 11751 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17018


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/17018] address increment of function parameters changes their order
  2004-08-13 14:36 [Bug c/17018] New: address increment of function parameters changes their order svetozarmarkov at netscape dot net
  2004-08-13 14:41 ` [Bug c/17018] " pinskia at gcc dot gnu dot org
  2004-08-13 15:40 ` bangerth at dealii dot org
@ 2004-08-13 15:40 ` bangerth at dealii dot org
  2 siblings, 0 replies; 4+ messages in thread
From: bangerth at dealii dot org @ 2004-08-13 15:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-08-13 15:40 -------
That's a duplicate of... 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17018


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-08-13 15:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-13 14:36 [Bug c/17018] New: address increment of function parameters changes their order svetozarmarkov at netscape dot net
2004-08-13 14:41 ` [Bug c/17018] " pinskia at gcc dot gnu dot org
2004-08-13 15:40 ` bangerth at dealii dot org
2004-08-13 15:40 ` bangerth at dealii dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).