From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31418 invoked by alias); 6 May 2002 09:42:14 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 31402 invoked from network); 6 May 2002 09:42:11 -0000 Received: from unknown (HELO purple.csi.cam.ac.uk) (131.111.8.4) by sources.redhat.com with SMTP; 6 May 2002 09:42:11 -0000 Received: from student.cusu.cam.ac.uk ([131.111.179.82] helo=kern.srcf.societies.cam.ac.uk ident=mail) by purple.csi.cam.ac.uk with esmtp (Exim 4.04) id 174f0U-0003RM-00; Mon, 06 May 2002 10:42:10 +0100 Received: from jsm28 (helo=localhost) by kern.srcf.societies.cam.ac.uk with local-esmtp (Exim 3.12 #1 (Debian)) id 174f0U-0000O5-00; Mon, 06 May 2002 10:42:10 +0100 Date: Mon, 06 May 2002 02:42:00 -0000 From: "Joseph S. Myers" X-X-Sender: To: Aldy Hernandez cc: Subject: Re: rfc: __builtin_types_compatible_p and unsigned literals In-Reply-To: <20020506034729.GA18128@redhat.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-05/txt/msg00371.txt.bz2 On Mon, 6 May 2002, Aldy Hernandez wrote: > for example, > > int foo (unsigned int blah) { } > > accepts foo(31) as well as foo(31U). It also accepts foo(31LL) and other such implicitly convertible types, if the prototype is in scope. Or are you referring to the special case where a prototype isn't in scope (and for variable arguments), and signed/unsigned can be mixed provided the value is representable in both types? > can i "fix" __builtin_types_compatible_p? The types aren't compatible. (Pointers to them aren't even implictly convertible, though you'll need -pedantic to get a warning about that.) Making the specification more complicated and less representative of the name of the built-in function seems dubious. -- Joseph S. Myers jsm28@cam.ac.uk