Article View: gnu.gcc.help
Article #53566arrays of pointers and "incompatible pointer" warnings
From: Richard M Stallman
Date: Tue, 29 Oct 1991 22:23
Date: Tue, 29 Oct 1991 22:23
12 lines
1304 bytes
1304 bytes
about incompatible pointer types.
> lala.c: In function a_function:
> lala.c:13: warning: argument passing between incompatible pointer types
Removing const makes the pointers compatible -- implying that
const char *[] is incompatible with char **. This seems wrong,
GCC is following ANSI C, which says that these types aren't compatible.
In this case, I don't think anything is really wrong with the code.
But you can avoid the warning by adding a cast, and I think that's
a simple enough option, so there's no problem with how things are now.
Technical Details
Message-ID:
<9110292023.AA19922@dist.dist.unige.it>Path:
arc1-ca.pugleaf.net!gmdzi!zeus.ieee.org!dorm.rutgers.edu!rutgers!sun-barr!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!dist.dist.unige.it!rmsReferences:
<1991Oct29.135344.5109@viewlogic.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,cfce2e2da9583e5 X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1991-10-29 13:31:56 PST Path: arc1-ca.pugleaf.net!gmdzi!zeus.ieee.org!dorm.rutgers.edu!rutgers!sun-barr!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!dist.dist.unige.it!rms From: rms@dist.dist.unige.it (Richard M Stallman) Newsgroups: gnu.gcc.help Subject: arrays of pointers and "incompatible pointer" warnings Message-ID: <9110292023.AA19922@dist.dist.unige.it> Date: 29 Oct 91 22:23:05 GMT References: <1991Oct29.135344.5109@viewlogic.com> Sender: daemon@cis.ohio-state.edu Reply-To: rms@gnu.ai.mit.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 12