Subject: Re: __UNCONST(a)
To: Pavel Cahyna <email@example.com>
From: Christos Zoulas <firstname.lastname@example.org>
Date: 07/05/2004 17:10:42
On Jul 5, 2:20pm, email@example.com (Pavel Cahyna) wrote:
-- Subject: Re: __UNCONST(a)
| On Wed, 30 Jun 2004 12:21:42 +0000, Christos Zoulas wrote:
| > On Jun 30, 4:44pm, lukem@NetBSD.org (Luke Mewburn) wrote:
| > | Is this to work around gcc and/or lint being overly aggressive
| > | in enforcing "const"ness of a type? Or bugs in those tools?
| > No, the tools do what they were asked for. Write strchr(),
| > and make it work without warnings setting WARNS=3... The problem
| > is const castaways are parts of the apis of functions such as
| > strchr(), strtol() etc:
| Why not implement strchr as a macro which returns const char * if the
| input is const char * and a non-const * if the input is non-const *?
That is a nice idea and it would work in this case, but there
are many other cases...