Subject: Re: __UNCONST(a)
To: Christos Zoulas <firstname.lastname@example.org>
From: Pavel Cahyna <email@example.com>
Date: 07/06/2004 10:34:01
> | 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...
It was not meant as a substitute for __UNCONST, you still need it to
implement strchr as a function (according to SUSv3, you must provide a
function, even if you offer an implementation as a macro). It was meant
to have better error checking and consistent behaviour of "const".