From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5385 invoked by alias); 7 Oct 2002 10:16:03 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 5371 invoked by uid 71); 7 Oct 2002 10:16:02 -0000 Date: Mon, 07 Oct 2002 03:16:00 -0000 Message-ID: <20021007101602.5370.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Neil Booth Subject: Re: preprocessor/8139: Bad new INT64_C macro Reply-To: Neil Booth X-SW-Source: 2002-10/txt/msg00247.txt.bz2 List-Id: The following reply was made to PR preprocessor/8139; it has been noted by GNATS. From: Neil Booth To: Philippe RIBET Cc: gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org Subject: Re: preprocessor/8139: Bad new INT64_C macro Date: Mon, 7 Oct 2002 11:11:06 +0100 Philippe RIBET wrote:- > >I suspect the warnings are correct, but new, and that the definition > of the macro is unchanged. > No, definition changed. > No, warnings are not correct as INT64_C(-3000000000) is valid code because > -3000000000 is valid 64bits integer. No, that's your misunderstanding. The integer is 300000000; the - is an operator, and it is not 64 bit. It has type int. > >You should probably add a U to the relevant numbers. > ??? 'U' with negative numbers ??? > > >Anyway, not a GCC bug. > Is IS a GCC bug if you consider ANSI C99 standard. I don't think so. You can fix your code like I suggested. Neil.