Mail Archives: djgpp/2000/05/05/01:17:31
On Thu, 4 May 2000 14:09:19 Eli Zaretskii wrote:
>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 ;-).
>
No, gcc doesn't flag this as a possible error even with
the -Wall switch on. And yes, it is a bug when you
refer to an `extern char **string_array' in one file
when in fact, it was declared as `char *string_array[]'
in another. But, you can pass the latter to a function
that takes a `char **' parameter and it compiles and
runs cleanly (AFAIK).
---
nimrod_a_abing
Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at http://www.eudoramail.com
- Raw text -