Date: Thu, 4 May 2000 14:09:19 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: "nimrod a. abing" cc: djgpp AT delorie DOT com Subject: Re: gdb problem or just silly me - please help In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Thu, 4 May 2000, nimrod a. abing wrote: > I think it's because the compiler seems to confuse > between `char **string_array' and > `char *string_array[]'. The former is a pointer to > pointer to char types. The latter is an array of char > pointers. The compiler is not confused: these *are* two different things, as others have explained to you. It was a bug in your code. > If the compiler compiles this without issuing > some sort of warning, then one would assume the code is > correct when in fact they refer to two distinct types. Welcome to C. The C programming language traditionally assumes that the programmer knows what she is doing. You should turn on all of the warning options ("-Wall -W" would be a good start) if you want better diagnostics, but even then I'm not sure the compiler would flag this particular bug, because some valid programs use it (and know how not to crash ;-).