[Bug c/48951] New: probably, it is a bug.
ufo008ahw at 163 dot com
gcc-bugzilla@gcc.gnu.org
Tue May 10 16:14:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48951
Summary: probably, it is a bug.
Product: gcc
Version: 3.4.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: ufo008ahw@163.com
I have written a program.I have use long long a type variable and scanf("%lld")
for input,but when i compare it with a int type one, the Conditional expression
is wrong.thanks for your reply.
My code is:
#include "stdio.h"
int main()
{
int i;
long long n;
scanf("%lld", &n);
printf("================\n");
printf("%lld\n", n);
i = 4;
printf("%d\n", (long long)i < n);
printf("================\n");
n = (long long)1;
printf("%lld\n", n);
printf("%d\n", (long long)i < n);
}
More information about the Gcc-bugs
mailing list