[cairo] [PATCH] cairo-gl: Fix build with -Werror -Wundef

Olivier Blin olivier.blin at softathome.com
Mon Nov 9 06:39:51 PST 2015


Le 09/11/2015 15:18, Chris Wilson a écrit :
> On Mon, Nov 09, 2015 at 03:13:03PM +0100, Olivier Blin wrote:
> > Testing undefined macros is an error with -Werror -Wundef.
> > This is important to fix in cairo-gl.h since this is a public header.
>
> This breaks the C spec and you think it is a bug.
Hi Chris,

You are right, the C spec states that undefined identifiers are replaced 
with 0.
But this does not forbid to add extra checks, like done for other 
warnings in gcc that imply stronger rules than the C spec.

WebKit for example does enable extra warnings in gcc, including -Wundef, 
and this causes a lot of uninteresting warnings from those cairo checks.
And while I don't know of any other project doing it, this would also 
break when adding -Werror.

Thanks for your  fast reply.

-- 
Olivier Blin - SoftAtHome



More information about the cairo mailing list