From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24626 invoked by alias); 16 Dec 2008 05:11:37 -0000 Received: (qmail 24616 invoked by uid 22791); 16 Dec 2008 05:11:36 -0000 X-SWARE-Spam-Status: No, hits=2.2 required=5.0 tests=AWL,BAYES_50,DNS_FROM_OPENWHOIS,J_CHICKENPOX_15,SPF_HELO_PASS,SPF_PASS,WEIRD_PORT,WHOIS_MYPRIVREG X-Spam-Check-By: sourceware.org Received: from kuber.nabble.com (HELO kuber.nabble.com) (216.139.236.158) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 16 Dec 2008 05:10:53 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1LCSCp-0003am-DX for gcc-help@gcc.gnu.org; Mon, 15 Dec 2008 21:10:51 -0800 Message-ID: <21027430.post@talk.nabble.com> Date: Tue, 16 Dec 2008 05:11:00 -0000 From: yangch To: gcc-help@gcc.gnu.org Subject: Re: pointer reference comparing with int in gcc 4.1.2 In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit References: <21026658.post@talk.nabble.com> X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-12/txt/msg00175.txt.bz2 me22 wrote: > > On Mon, Dec 15, 2008 at 22:30, yangch wrote: >> >> void f(str_t const &s) >> { >> printf("sizeof s:%d\n",sizeof(s)); >> if(s) >> printf("%s\n",s); >> } >> >> test.cc: In function 'void f(const char (&)[10])': >> test.cc:9: error: invalid operands of types 'const char (&)[10]' and >> 'int' >> to binary 'operator!=' >> > > I think it's just a bug in 4.1.2. It compiles fine in 4.3.1. > > HTH, > ~ Scott > > P.S. Rather odd that it talks about != there... > > Do you know the bug number or name ? -- View this message in context: http://www.nabble.com/pointer-reference-comparing-with-int-in-gcc-4.1.2-tp21026658p21027430.html Sent from the gcc - Help mailing list archive at Nabble.com.