From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24577 invoked by alias); 7 Apr 2003 14:04:23 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 24476 invoked from network); 7 Apr 2003 14:04:20 -0000 Received: from unknown (HELO Cantor.suse.de) (213.95.15.193) by sources.redhat.com with SMTP; 7 Apr 2003 14:04:20 -0000 Received: from Hermes.suse.de (Hermes.suse.de [213.95.15.136]) by Cantor.suse.de (Postfix) with ESMTP id 3E87614C98; Mon, 7 Apr 2003 16:04:20 +0200 (MEST) To: "A.R. Ashok Kumar" Cc: Lev Assinovsky , John Love-Jensen , Eric Botcazou , gcc-bugs@gcc.gnu.org, gcc-help@gcc.gnu.org Subject: Re: gcc 3.3: long long bug? X-Yow: LOOK!! Sullen American teens wearing MADRAS shorts and ``Flock of Seagulls'' HAIRCUTS! From: Andreas Schwab Date: Mon, 07 Apr 2003 14:04:00 -0000 In-Reply-To: (A. R. Ashok Kumar's message of "Mon, 7 Apr 2003 18:55:58 +0530 (IST)") Message-ID: User-Agent: Gnus/5.090017 (Oort Gnus v0.17) Emacs/21.3.50 (gnu/linux) References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-SW-Source: 2003-04/txt/msg00075.txt.bz2 "A.R. Ashok Kumar" writes: |> Hi, |> |> > I think gcc 3.2 (which didn't give me any errors) |> > behaves more properly, automatically converting |> > rvalue to lvalue. Such behavior also solves |> > "long long long ..." problems. |> |> Have you obtained correct result? |> |> For me, the following program gives wrong result(using gcc 2.7.2 on |> sparc-sun-solaris2.3). |> |> ------ |> const long long n = 34359738368LL; |> int main() { |> printf("%ld\n", n); Undefined behaviour. %ld expects long, but n is long long. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."