public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/11751] New: wrong evaluation of an expression
@ 2003-07-31 17:52 me at elitsa dot net
  2003-07-31 17:55 ` [Bug c/11751] " pinskia at physics dot uc dot edu
                   ` (50 more replies)
  0 siblings, 51 replies; 52+ messages in thread
From: me at elitsa dot net @ 2003-07-31 17:52 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: wrong evaluation of an expression
           Product: gcc
           Version: 3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: me at elitsa dot net
                CC: gcc-bugs at gcc dot gnu dot org

bellow is simple code that express this bug:

/************
 * File : b.C
 ************/

#include <stdio.h>

int main()
        {
        int a = 1;
        printf(" a = %i \n",(a++)+(++a));               //4

        a = 1;
        printf(" a = %i \n",(a++)+(a++)+(++a));         //4

        return 0;
        }






After compilation in a following way:

c++ -o b b.C

The result was:

 a = 4 
 a = 4


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

end of thread, other threads:[~2005-09-22 17:07 UTC | newest]

Thread overview: 52+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-31 17:52 [Bug c/11751] New: wrong evaluation of an expression me at elitsa dot net
2003-07-31 17:55 ` [Bug c/11751] " pinskia at physics dot uc dot edu
2004-08-05 15:01 ` bangerth at dealii dot org
2004-08-05 15:01 ` bangerth at dealii dot org
2004-08-05 15:01 ` bangerth at dealii dot org
2004-08-05 15:02 ` bangerth at dealii dot org
2004-08-05 15:02 ` bangerth at dealii dot org
2004-08-13 15:39 ` bangerth at dealii dot org
2004-08-13 15:40 ` bangerth at dealii dot org
2004-08-13 15:46 ` [Bug c/11751] wrong evaluation order " bangerth at dealii dot org
2004-08-13 15:46 ` bangerth at dealii dot org
2004-08-13 16:03 ` bangerth at dealii dot org
2004-08-13 16:04 ` bangerth at dealii dot org
2004-08-13 16:04 ` bangerth at dealii dot org
2004-08-13 16:04 ` bangerth at dealii dot org
2004-08-13 16:04 ` bangerth at dealii dot org
2004-08-13 16:05 ` bangerth at dealii dot org
2004-08-13 16:05 ` bangerth at dealii dot org
2004-08-13 16:05 ` bangerth at dealii dot org
2004-08-19  8:01 ` reichelt at gcc dot gnu dot org
2004-08-31 20:46 ` bangerth at dealii dot org
2004-09-02 12:36 ` schwab at suse dot de
2004-09-02 13:01 ` giovannibajo at libero dot it
2004-09-03  5:23 ` pinskia at gcc dot gnu dot org
2004-09-15 19:51 ` reichelt at gcc dot gnu dot org
2004-09-23 20:54 ` pinskia at gcc dot gnu dot org
2004-10-15 15:49 ` bangerth at dealii dot org
2005-02-07  6:46 ` pcarlini at suse dot de
2005-02-24  9:25 ` pinskia at gcc dot gnu dot org
2005-02-24 10:13 ` d_picco at hotmail dot com
2005-02-24 10:21 ` pinskia at gcc dot gnu dot org
2005-02-24 10:38 ` d_picco at hotmail dot com
2005-02-24 10:59 ` pinskia at gcc dot gnu dot org
2005-02-24 13:41 ` d_picco at hotmail dot com
2005-02-24 14:51 ` schlie at comcast dot net
2005-04-20  2:45 ` pinskia at gcc dot gnu dot org
2005-04-20  2:48 ` pinskia at gcc dot gnu dot org
2005-04-20  2:55 ` pinskia at gcc dot gnu dot org
2005-04-20  2:59 ` pinskia at gcc dot gnu dot org
2005-04-20  2:59 ` pinskia at gcc dot gnu dot org
2005-04-20  3:00 ` pinskia at gcc dot gnu dot org
2005-04-20  3:01 ` pinskia at gcc dot gnu dot org
2005-04-20  3:03 ` pinskia at gcc dot gnu dot org
2005-04-20  3:03 ` pinskia at gcc dot gnu dot org
2005-04-20  3:06 ` pinskia at gcc dot gnu dot org
2005-04-21  5:06 ` pinskia at gcc dot gnu dot org
2005-04-27 11:41 ` giovannibajo at libero dot it
2005-05-05 18:12 ` pinskia at gcc dot gnu dot org
2005-06-30 13:27 ` pinskia at gcc dot gnu dot org
2005-06-30 13:38 ` pinskia at gcc dot gnu dot org
2005-07-01 14:29 ` pinskia at gcc dot gnu dot org
2005-09-22 17:07 ` pinskia at gcc dot gnu 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).