This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c/5589: if (c > c++) is tested as yes by gcc !!!
- From: yann dot helleboid at wanadoo dot fr
- To: gcc-gnats at gcc dot gnu dot org
- Date: 4 Feb 2002 16:24:46 -0000
- Subject: c/5589: if (c > c++) is tested as yes by gcc !!!
- Reply-to: yann dot helleboid at wanadoo dot fr
>Number: 5589
>Category: c
>Synopsis: if (c > c++) is tested as yes by gcc !!!
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Feb 04 11:06:20 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: yann helleboid
>Release: gcc version 2.7.2
>Organization:
>Environment:
Sun solaris 2.6 on a Sun E450
>Description:
the following program gives a wrong output
program :
#include <stdio.h>
int main()
{
int c = 0;
if (c > c++)
printf ("there must be a bug in gcc\n");
else
printf ("no problem\n");
return 0;
}
the compile line is:
gcc -o program program.c
running program gives :
there must be a bug in gcc
so gcc tells us that c is greater than c++ !!!!
>How-To-Repeat:
compile and run the program in the description zone
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: