Ian Lance Taylor wrote:

> We should handle must_use_result and warn_unused_result similarly, except 
> that adding a cast to (void) disables the warn_unused_result warning.  
> Perhaps there should also be other simple ways to disable the 
> warn_unused_result warning.
>
> This is not a great solution, but I don't see a better way out of the current 
> unpleasant situation.

You seem to be looking for an absolute solution, and there is none. You can't 
do it all on the GCC side alone.

The reasonable (or, "great enough") solution would be to just trust explicit 
developer's void-casting.

Also, 'warn_unused_result' should be enough;  there is no need to add more 
levels to this simple paradigm.

Denis

Reply via email to