linux-gcc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Denis Zaitsev <zzz@anda.ru>
To: gcc@gcc.gnu.org, linux-gcc@vger.kernel.org
Subject: Incorrect warning message?
Date: Sun, 16 Jan 2005 02:08:36 +0500	[thread overview]
Message-ID: <20050116020836.A2421@natasha.ward.six> (raw)

It's an example:

void c(const char *s){}
void cc(const char **p){}
void x()
{
    char *s;
    c(s);
    cc(&s);
}

And it's the warning GCC produces for it:

bug.c: In function `x':
bug.c:7: warning: passing arg 1 of `cc' from incompatible pointer type

Is this message correct?  Doesn't the <const char> for the second
defun's declaration mean exactly the same as it means for the first -
the fact that defun doesn't modify the content of the corresponding
array?

             reply	other threads:[~2005-01-15 21:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-15 21:08 Denis Zaitsev [this message]
2005-01-15 22:05 ` Incorrect warning message? Andreas Schwab
2005-01-15 22:32   ` Denis Zaitsev
2005-01-17 16:48     ` Joe Buck
2005-01-18 23:12       ` Denis Zaitsev

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=20050116020836.A2421@natasha.ward.six \
    --to=zzz@anda.ru \
    --cc=gcc@gcc.gnu.org \
    --cc=linux-gcc@vger.kernel.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 NNTP newsgroup(s).