All of lore.kernel.org
 help / color / mirror / Atom feed
* Incorrect warning message?
@ 2005-01-15 21:08 Denis Zaitsev
  2005-01-15 22:05 ` Andreas Schwab
  0 siblings, 1 reply; 5+ messages in thread
From: Denis Zaitsev @ 2005-01-15 21:08 UTC (permalink / raw)
  To: gcc, linux-gcc

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?

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-01-18 23:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-15 21:08 Incorrect warning message? Denis Zaitsev
2005-01-15 22:05 ` Andreas Schwab
2005-01-15 22:32   ` Denis Zaitsev
2005-01-17 16:48     ` Joe Buck
2005-01-18 23:12       ` Denis Zaitsev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.