Subject: Re: __UNCONST(a)
To: Christos Zoulas <christos@zoulas.com>
From: Pavel Cahyna <pcah8322@artax.karlin.mff.cuni.cz>
List: tech-userlevel
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".

Pavel