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

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...

  reply	other threads:[~2008-12-16  3:48 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 [this message]
2008-12-16  5:11   ` yangch
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=fa28b9250812151948s43fa0ed1pd226959cbba2379f@mail.gmail.com \
    --to=me22.ca@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=yangchanghua@gmail.com \
    /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).