This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
c/3463: A problem with long long ints
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c/3463: A problem with long long ints
- From: William Scott <wims at dcs dot ed dot ac dot uk>
- Date: Thu, 28 Jun 2001 16:33:03 +0100
>Number: 3463
>Category: c
>Synopsis: A problem with long long ints
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Thu Jun 28 08:36:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: William Scott
>Release: 3.0
>Organization:
Division of Informatics, The University of Edinburgh
>Environment:
System: Linux barbecued.dcs.ed.ac.uk 2.2.16_public-3.dcs.9 #1 Wed Jan 24 07:30:43 GMT 2001 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ./configure --prefix=/useful/risky/wims/
>Description:
When trying to add 1 to an unsigned long long int I get 0 instead of a large number
>How-To-Repeat:
unsigned long long int sum;
sum = 0xffffffff + 0x01;
printf("%llu",sum);
result should be 4294967296 but comes out as 0
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: