[ECOS] Dumb C question..
Andrew Lunn
andrew@lunn.ch
Wed Dec 24 18:52:00 GMT 2008
> OK, I try a bit harder. I reproduce this warning only with my native
> gcc-snapshot which is gcc (Ubuntu 20080404-0ubuntu1) 4.3.1 20080404
> (prerelease) [gcc-4_3-branch revision 133917]. None of the other gcc's
> do this, not even 4.3.2-arm-eabi.
gcc version 4.3.1 (Debian 4.3.1-8) on my debian system and i'm using
it for sythn.
> The result of memchr is assigned to a variable void *ret. If the type of
> ret is changed to 'const void *', the warning disappears. This is in
> contradiction with the prototype for memchr: void *memchr(const void *s,
> int c, size_t n). (Even though a return of const void * might actually
> be better).
So it seems like a compiler bug. I will not fix it then.
Thanks for looking at the code.
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss
mailing list