linux-gcc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: gcc@gcc.gnu.org
Cc: linux-gcc@vger.kernel.org
Subject: Re: Incorrect warning message?
Date: Sat, 15 Jan 2005 23:05:44 +0100	[thread overview]
Message-ID: <jesm52pcuf.fsf@sykes.suse.de> (raw)
In-Reply-To: <20050116020836.A2421@natasha.ward.six> (Denis Zaitsev's message of "Sun, 16 Jan 2005 02:08:36 +0500")

Denis Zaitsev <zzz@anda.ru> writes:

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

Read question 11.10 of the C faq.

http://www.eskimo.com/~scs/C-faq/q11.10.html

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

  reply	other threads:[~2005-01-15 22:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-15 21:08 Incorrect warning message? Denis Zaitsev
2005-01-15 22:05 ` Andreas Schwab [this message]
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=jesm52pcuf.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --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).