[Bug c/61815] New: precedence of operators is not being followed

2014-07-15 Thread saisusheelsunkara at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61815

Bug ID: 61815
   Summary: precedence of operators is not being followed
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: saisusheelsunkara at hotmail dot com

int i=3,y;
y=++i*++i*++i;
printf("%d",y);


here the output being printed is 150? but as per precedence of operators the
output must have been 216 but instead of considering precedence they are simply
excuting in the order they are to be done in the evaluation of postfix notation
where operands like ++i are treated literaly as a string.

where as on performing
y=++i*++i;
the output i am getting is 25 which is as per precedence of operators in c


[Bug c/61815] precedence of operators is not being followed

2014-07-15 Thread saisusheelsunkara at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61815

--- Comment #2 from saisusheelsunkara at hotmail dot com ---
its from left to right order?
(In reply to Andrew Pinski from comment #1)
> The precedence of operators is being followed but what the C standard does
> not say which side of the * is evaluated first.


[Bug c/61815] precedence of operators is not being followed

2014-07-15 Thread saisusheelsunkara at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61815

--- Comment #3 from saisusheelsunkara at hotmail dot com ---
if it is following the precedence then output must have been 216?