On Fri, Aug 18, 2017 at 02:48:42PM +0700, Robert Elz wrote: > Date: Fri, 18 Aug 2017 01:55:39 +0200 > From: Joerg Sonnenberger <jo...@bec.de> > Message-ID: <20170817235539.ga28...@britannica.bec.de> > > | This is sadly the canonical way to do it. > > That is a pain... > > | With C cast rules, you can't win in this case. > > Oh well... > > | C compilers will bitch about it. > > gcc (on current) didn't. I did test this before suggesting it.
Try the attached test case with -Wall. Joerg
void testfun(const char *const *); void testcaller(void) { const char *argvec[10]; char *argvec2[10]; testfun(argvec); testfun(argvec2); }