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: unassig...@gcc.gnu.org
        ReportedBy: ufo008...@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);
}

Reply via email to