[Mesa-stable] [Mesa-dev] [PATCH 02/15] glsl: Do not allow undefining the built-in macros
Carl Worth
cworth at cworth.org
Wed Jun 11 17:32:12 PDT 2014
Anuj Phogat <anuj.phogat at gmail.com> writes:
> Fixes piglit tests in spec/glsl-es-3.00/compile:
> undef-__FILE__.vert
> undef-GL_ES.vert
> undef-__LINE__.vert
> undef-__VERSION__.vert
I see the code that will fix __FILE__, __LINE__, and __VERSION__, but
not GL_ES. Should that line be dropped from the commit message?
> + if (strcmp("__LINE__", $3) == 0
> + || strcmp("__FILE__", $3) == 0
> + || strcmp("__VERSION__", $3) == 0)
> + glcpp_error(& @1, parser, "Built-in (pre-defined)"
> + " macro names can not be undefined.");
> +
In the future, we might think about looping a list of defined builtins,
(which might make it easier to support conditional things like I imagine
GL_ES is). But the above looks fine for now.
If the commit message is updated as appropriate based on my comment
above:
Reviewed-by: Carl Worth <cworth at cworth.org>
But I don't want to see any changes to the pre-processor without
corresponding new tests added to glcpp/tests. I'm writing such tests for
each patch in your series, and I'll follow up here with them.
Thanks,
-Carl
--
carl.d.worth at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-stable/attachments/20140611/524f6bc0/attachment.sig>
More information about the mesa-stable
mailing list