On Wed, Jan 16, 2013 at 10:00:42AM -0800, Jeff King wrote:
> It is not about the macro itself, but rather the callsites that do not
> return error, but call it for its printing side effect. It seems that
> clang -Wunused-value is OK with unused values from functions being
> discarded, but not with constants. So:
>   int foo();
>   void bar()
>   {
>     foo(); /* ok */
>     1; /* not ok */
>     (foo(), 1); /* not ok */
>   }
> The first one is OK (I think it would fall under -Wunused-result under
> either compiler). The middle one is an obvious error, and caught by both
> compilers. The last one is OK by gcc, but clang complains.

I wonder if this would be changed in clang - the change in [1] is
superficially similar.

[1] http://llvm.org/bugs/show_bug.cgi?id=13747
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to