This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/13348] New: precedence of the operators ++ and parenthesis
- From: "igor dot mat at uni-mb dot si" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Dec 2003 01:17:41 -0000
- Subject: [Bug c/13348] New: precedence of the operators ++ and parenthesis
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The precendence of the parenthesis should be bigger then ++,
so in my belief the statement
all = (first = *pointer++) + (second=*pointer++);
should assign first the first entry in table,
and second the second value in the table.
But gcc assigns both the first value in the table
(executes:
first=*pointer; second=*pointer; all=first+second; pointer++; pointer++;
instead of - in my belief correct:
first = *pointer++; second = *pointer++; all=first+second;
)
I believe that this is a bug and not a feature which on matlab's windows'
compiler may work differently then in gcc.
Best regards, igor dukanovic
--
Summary: precedence of the operators ++ and parenthesis
Product: gcc
Version: 3.2.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: igor dot mat at uni-mb dot si
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13348