Bug 8620 - not possible to assign big value to long long variable
Summary: not possible to assign big value to long long variable
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 3.3
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
: 12767 17785 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-11-18 02:16 UTC by arvin
Modified: 2004-10-02 04:11 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description arvin 2002-11-18 02:16:02 UTC
not possible to assign big value to long long variable

Release:
gcc 3.3 [mainline regression]

Environment:
linux - i386

How-To-Repeat:
#include <stdio.h>
int main ()
{
        long long a;
        a = (long long)(0x100000000);
}

produces:

test.c: In function `main':
test.c:5: warning: integer constant is too large for "long" type
Comment 1 Neil Booth 2002-11-18 04:21:29 UTC
State-Changed-From-To: open->closed
State-Changed-Why: Not a bug.  It is not complaining about the assignment, but about the constant.  You need to add a suffix.
Comment 2 Andrew Pinski 2003-10-24 18:26:51 UTC
*** Bug 12767 has been marked as a duplicate of this bug. ***
Comment 3 Andrew Pinski 2004-10-02 04:11:31 UTC
*** Bug 17785 has been marked as a duplicate of this bug. ***