public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: yangch <yangchanghua@gmail.com>
To: gcc-help@gcc.gnu.org
Subject: Re: pointer reference comparing with int in gcc 4.1.2
Date: Tue, 16 Dec 2008 05:11:00 -0000	[thread overview]
Message-ID: <21027430.post@talk.nabble.com> (raw)
In-Reply-To: <fa28b9250812151948s43fa0ed1pd226959cbba2379f@mail.gmail.com>




me22 wrote:
> 
> On Mon, Dec 15, 2008 at 22:30, yangch <yangchanghua@gmail.com> 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.

  reply	other threads:[~2008-12-16  5:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-16  3:31 yangch
2008-12-16  3:48 ` me22
2008-12-16  5:11   ` yangch [this message]
2008-12-16 15:09     ` me22

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21027430.post@talk.nabble.com \
    --to=yangchanghua@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).