[Mesa-dev] [PATCH] glcpp: Reject #version after the version has been resolved.
Jordan Justen
jljusten at gmail.com
Wed Jan 29 15:30:07 PST 2014
Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>
On Wed, Jan 29, 2014 at 12:48 PM, Matt Turner <mattst88 at gmail.com> wrote:
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74166
> ---
> src/glsl/glcpp/glcpp-parse.y | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y
> index 17bc649..4dba051 100644
> --- a/src/glsl/glcpp/glcpp-parse.y
> +++ b/src/glsl/glcpp/glcpp-parse.y
> @@ -375,9 +375,15 @@ control_line:
> _glcpp_parser_skip_stack_pop (parser, & @1);
> } NEWLINE
> | HASH_VERSION integer_constant NEWLINE {
> + if (parser->version_resolved) {
> + glcpp_error(& @1, parser, "#version after version is resolved");
> + }
> _glcpp_parser_handle_version_declaration(parser, $2, NULL, true);
> }
> | HASH_VERSION integer_constant IDENTIFIER NEWLINE {
> + if (parser->version_resolved) {
> + glcpp_error(& @1, parser, "#version after version is resolved");
> + }
> _glcpp_parser_handle_version_declaration(parser, $2, $3, true);
> }
> | HASH NEWLINE {
> --
> 1.8.3.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list