[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#225186: marked as done (g++-3.3: error compiling max value for a long long)



Your message dated Mon, 29 Dec 2003 10:58:59 +0100
with message-id <16367.64227.141808.336691@gargle.gargle.HOWL>
and subject line Bug#225186: Acknowledgement (g++-3.3: error compiling max value for a long long)
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 27 Dec 2003 05:41:53 +0000
>From jim@amarooas.com.au Fri Dec 26 23:41:52 2003
Return-path: <jim@amarooas.com.au>
Received: from mail.canberrawines.com.au (mailhost.netspeed.com.au) [203.31.48.33] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1Aa4iv-0004Tx-00; Fri, 26 Dec 2003 21:02:41 -0600
Received: from sun (unverified [203.22.237.63]) 
	by mailhost.netspeed.com.au (SurgeMail 1.6b) with ESMTP id 11838627 
	for <submit@bugs.debian.org>; Sat, 27 Dec 2003 14:04:43 +1100
Received: from jim by sun with local (Exim 3.36 #1 (Debian))
	id 1Aa4is-0001Rn-00; Sat, 27 Dec 2003 14:02:38 +1100
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Jim Watson <jim@amarooas.com.au>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: g++-3.3: error compiling max value for a long long
X-Mailer: reportbug 2.36
Date: Sat, 27 Dec 2003 14:02:38 +1100
Message-Id: <[🔎] E1Aa4is-0001Rn-00@sun>
X-Server: High Performance Mail Server - http://surgemail.com
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 
	2.60-master.debian.org_2003_11_25-bugs.debian.org_2003_12_15 
	(1.212-2003-09-23-exp) on master.debian.org
X-Spam-Status: No, hits=-5.0 required=4.0 tests=HAS_PACKAGE autolearn=no 
	version=2.60-master.debian.org_2003_11_25-bugs.debian.org_2003_12_15
X-Spam-Level: 

Package: g++-3.3
Version: 1:3.3.2-4
Severity: normal
Tags: sid



-- System Information:
Debian Release: testing/unstable
Architecture: sparc
Kernel: Linux sun 2.4.18 #1 SMP Mon Jan 27 14:07:39 EST 2003 sparc64
Locale: LANG=en_US, LC_CTYPE=en_US

Versions of packages g++-3.3 depends on:
ii  gcc-3.3                     1:3.3.2-4    The GNU C compiler
ii  gcc-3.3-base                1:3.3.2-4    The GNU Compiler Collection (base 
ii  libc6                       2.3.2.ds1-10 GNU C Library: Shared libraries an
ii  libstdc++5-3.3-dev          1:3.3.2-4    The GNU Standard C++ Library v3 (d

-- no debconf information
This gives an error on g++-3.3 
and warnings on gcc-3.3 or g++ with -fpermissive.

I think the max value is correct because max + 1 --> negative max.

The program output:

jim@sun:/usr/local/645/sal$ ./type_test
max + 1  =      -9223372036854775808
max - 1  =       9223372036854775806
max      =       9223372036854775807, size = 8

The compiler messages:

jim@sun:/usr/local/645/sal$ g++  -o type_test type_test.c
type_test.c: In function 	nt main()':
type_test.c:7: error: integer constant is too large for "long" type
type_test.c:8: error: integer constant is too large for "long" type
type_test.c:9: error: integer constant is too large for "long" type

jim@sun:/usr/local/645/sal$ g++  -fpermissive -o type_test type_test.c
type_test.c: In function 	nt main()':
type_test.c:7: warning: integer constant is too large for "long" type
type_test.c:8: warning: integer constant is too large for "long" type
type_test.c:9: warning: integer constant is too large for "long" type

The code:

jim@sun:/usr/local/645/sal$ cat type_test.c
#include <stdio.h>
typedef long long sal_Int64;
sal_Int64 bit64;
#define SAL_MAX_INT64 ((sal_Int64) 0x7FFFFFFFFFFFFFFF)
int main(void)
{
        bit64 = SAL_MAX_INT64 ;
        printf("max + 1\t =\t%lld\n", SAL_MAX_INT64 + 1);
        printf("max - 1\t =\t %lld\n", SAL_MAX_INT64 - 1);
        printf("max\t =\t %lld, size = %d\n", bit64, sizeof(sal_Int64));
        return(0);
}



---------------------------------------
Received: (at 225186-done) by bugs.debian.org; 29 Dec 2003 10:14:34 +0000
>From doko@cs.tu-berlin.de Mon Dec 29 04:13:37 2003
Return-path: <doko@cs.tu-berlin.de>
Received: from mail.cs.tu-berlin.de [130.149.17.13] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1AauFe-0006rG-00; Mon, 29 Dec 2003 04:03:54 -0600
Received: from bolero.cs.tu-berlin.de (doko@bolero.cs.tu-berlin.de [130.149.19.1])
	by mail.cs.tu-berlin.de (8.9.3p2/8.9.3) with ESMTP id KAA13571;
	Mon, 29 Dec 2003 10:58:59 +0100 (MET)
Received: (from doko@localhost)
	by bolero.cs.tu-berlin.de (8.12.10+Sun/8.12.8/Submit) id hBT9wx6R018790;
	Mon, 29 Dec 2003 10:58:59 +0100 (MET)
From: Matthias Klose <doko@cs.tu-berlin.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <16367.64227.141808.336691@gargle.gargle.HOWL>
Date: Mon, 29 Dec 2003 10:58:59 +0100
To: Jim Watson <jim@amarooas.com.au>, 225186-done@bugs.debian.org
Subject: Re: Bug#225186: Acknowledgement (g++-3.3: error compiling max value for a long long)
In-Reply-To: <[🔎] 20031227055709.GA22339@amarooas.com.au>
References: <[🔎] E1Aa4is-0001Rn-00@sun>
	<handler.225186.B.107250371317026.ack@bugs.debian.org>
	<[🔎] 20031227055709.GA22339@amarooas.com.au>
X-Mailer: VM 7.03 under 21.4 (patch 6) "Common Lisp" XEmacs Lucid
Delivered-To: 225186-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 
	2.60-master.debian.org_2003_11_25-bugs.debian.org_2003_12_28 
	(1.212-2003-09-23-exp) on master.debian.org
X-Spam-Status: No, hits=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=no 
	version=2.60-master.debian.org_2003_11_25-bugs.debian.org_2003_12_28
X-Spam-Level: 

Jim Watson writes:
> This was fixed by adding "LL" after the constant values. sorry about the
> inconvenience, i guess it is "invalid"

closing the report.



Reply to: