From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15915 invoked by alias); 4 Apr 2003 19:27:09 -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 15892 invoked from network); 4 Apr 2003 19:27:08 -0000 Received: from unknown (HELO sccrmhc01.attbi.com) (204.127.202.61) by sources.redhat.com with SMTP; 4 Apr 2003 19:27:08 -0000 Received: from lucon.org (12-234-88-5.client.attbi.com[12.234.88.5]) by sccrmhc01.attbi.com (sccrmhc01) with ESMTP id <20030404192708001002n4uie>; Fri, 4 Apr 2003 19:27:08 +0000 Received: by lucon.org (Postfix, from userid 1000) id F2F252C67D; Fri, 4 Apr 2003 11:27:07 -0800 (PST) Date: Fri, 04 Apr 2003 19:42:00 -0000 From: "H. J. Lu" To: gcc@gcc.gnu.org Subject: What should __sync_bool_compare_and_swap be on ia64? Message-ID: <20030404112707.A1389@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i X-SW-Source: 2003-04/txt/msg00197.txt.bz2 I got # cat x.c #include int foo (long **x, long *i) { return __sync_bool_compare_and_swap (x, 0L, i); } # gcc -Wall x.c -c x.c: In function `foo': x.c:6: warning: cast from pointer to integer of different size x.c:6: warning: cast to pointer from integer of different size x.c:6: warning: return makes integer from pointer without a cast I have 2 questions: 1. According to my ia64 psABI, __sync_bool_compare_and_swap should return int. But gcc's version doesn't. 2. Why do I got warnings about casting of different size? H.J.