This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/17507] Problems with shift and increment operator precedence
- From: "work at paul dot dubuc dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Sep 2004 18:54:11 -0000
- Subject: [Bug c++/17507] Problems with shift and increment operator precedence
- References: <20040915184232.17507.work@paul.dubuc.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From work at paul dot dubuc dot org 2004-09-15 18:54 -------
I also tried this code on Red Hat Linux with GCC 3.2.2:
./a.out abcdef
pui=0xbffffa28 *pui=66656463
puc (before)=0xbffffa28
puc (after)=0xbffffa2c uint=63636363
Here the address is being incremented 4 times but the result still only consists
of the firt byte (taking into account the endian differences)
repeated 4 times.
g++ -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17507