Re: [PATCH] libiberty: {count,dup,write}argv: constify argv input slightly

2016-01-05 Thread Ian Lance Taylor
On Sat, Jan 2, 2016 at 10:39 PM, Mike Frysinger wrote: > Would be more useful if we could use "const char * const *", but there's > a long standing bug where gcc warns about incompatible pointers when you > try to pass in "char **". That's not a bug. It's how C works.

Re: [PATCH] libiberty: {count,dup,write}argv: constify argv input slightly

2016-01-05 Thread Mike Frysinger
On 05 Jan 2016 07:32, Ian Lance Taylor wrote: > On Sat, Jan 2, 2016 at 10:39 PM, Mike Frysinger wrote: > > Would be more useful if we could use "const char * const *", but there's > > a long standing bug where gcc warns about incompatible pointers when you > > try to pass in

[PATCH] libiberty: {count,dup,write}argv: constify argv input slightly

2016-01-02 Thread Mike Frysinger
Would be more useful if we could use "const char * const *", but there's a long standing bug where gcc warns about incompatible pointers when you try to pass in "char **". We can at least constify the array itself as gcc will not warn in that case. include/: 2016-01-03 Mike Frysinger