Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #3249

Re: Need some info on const char **

From Ike Naar <ike@sverige.freeshell.org>
Newsgroups comp.lang.c
Subject Re: Need some info on const char **
Date 2011-05-05 05:51 +0000
Organization A noiseless patient Spider
Message-ID <slrn3vfsis4en8.od2.ike@sverige.freeshell.org> (permalink)
References (4 earlier) <keahr61pvtnftn6vhtppsva2v51a3t7b0e@4ax.com> <slrn3vfsiri28s.hn3.ike@iceland.freeshell.org> <buikr6p8nu92pv0nfi215sbdesj58crflm@4ax.com> <slrn3vfsirl08v.nnt.ike@sverige.freeshell.org> <40t3s651v23rqng24ffb8dmj7417jv88pl@4ax.com>

Show all headers | View raw


On 2011-05-05, DSF <notavalid@address.here> wrote:
> On Fri, 29 Apr 2011 09:13:03 +0000 (UTC), Ike Naar
><ike@sverige.freeshell.org> wrote:
>>  /* ex.c */
>>  void foo(char const * const *s);
>>  void bar(char **s) { foo(s); }
>>
>>In C, the types in the call to foo() are incompatible and the compiler
>>must produce a diagnostic. Using gcc 4.1.2:
>>
>>  $ cc -ansi -Wall -pedantic -c ex.c
>>  ex.c:2: warning: passing argument 1 of 'foo' from incompatible pointer type
>
>   I forgot to mention that I copied and pasted your above code into my
> compiler, turned on all warnings, and compiled it.  It came up 0
> warnings, 0 errors.  I even turned on strict ANSI compliance (which I
> normally have to leave off if I want to compile *anything at all*) and
> still 0, 0!
>
>   So I can assume that at least in this instance, my compiler is not
> ANSI compliant. :(

Just out of curiosity: what compiler are you using?

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Need some info on const char ** DSF <notavalid@address.here> - 2011-04-26 18:49 -0500
  Re: Need some info on const char ** jt@toerring.de (Jens Thoms Toerring) - 2011-04-27 00:10 +0000
    Re: Need some info on const char ** DSF <notavalid@address.here> - 2011-04-27 00:38 -0500
      Re: Need some info on const char ** jt@toerring.de (Jens Thoms Toerring) - 2011-04-27 07:58 +0000
        Re: Need some info on const char ** Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-04-27 15:41 +0100
          Re: Need some info on const char ** lawrence.jones@siemens.com - 2011-04-27 14:42 -0400
        Re: Need some info on const char ** DSF <notavalid@address.here> - 2011-04-27 19:19 -0500
          Re: Need some info on const char ** Ike Naar <ike@iceland.freeshell.org> - 2011-04-28 06:28 +0000
            Re: Need some info on const char ** DSF <notavalid@address.here> - 2011-04-29 00:47 -0500
              Re: Need some info on const char ** Ike Naar <ike@sverige.freeshell.org> - 2011-04-29 09:13 +0000
                Re: Need some info on const char ** Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-04-29 16:08 +0100
                Re: Need some info on const char ** DSF <notavalid@address.here> - 2011-05-03 01:47 -0500
                Re: Need some info on const char ** Ike Naar <ike@otaku.freeshell.org> - 2011-05-03 07:45 +0000
                Re: Need some info on const char ** Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-05-03 11:55 +0100
                Re: Need some info on const char ** DSF <notavalid@address.here> - 2011-05-04 20:20 -0500
                Re: Need some info on const char ** Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-05-05 02:57 +0100
                Re: Need some info on const char ** DSF <notavalid@address.here> - 2011-05-07 22:03 -0500
                Re: Need some info on const char ** DSF <notavalid@address.here> - 2011-05-04 19:53 -0500
                Re: Need some info on const char ** falk@rahul.net (Edward A. Falk) - 2011-05-05 02:01 +0000
                Re: Need some info on const char ** Ike Naar <ike@sverige.freeshell.org> - 2011-05-05 05:51 +0000
                Re: Need some info on const char ** DSF <notavalid@address.here> - 2011-05-07 22:04 -0500
      Re: Need some info on const char ** Paul N <gw7rib@aol.com> - 2011-04-27 14:03 -0700

csiph-web