summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2012-11-27 12:18:02 -0800
committerIan Romanick <ian.d.romanick@intel.com>2013-01-11 10:57:25 -0800
commit5e918a3825ac34c1fc6e3d498adbfbe6e1001b47 (patch)
tree81abcf08e2650a6997b20aaa1db84b1861eb31af
parent93e719ba4da7c45cdddd276060acbcc1a4edceda (diff)
glcpp: Reject token pasting operator in GLES
The GLSL ES 3.0 spec (Section 12.17) says: "GLSL ES 1.00 removed token pasting and other functionality." NOTE: This is a candidate for the stable branches. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Carl Worth <cworth@cworth.org>
-rw-r--r--src/glsl/glcpp/glcpp-lex.l2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/glsl/glcpp/glcpp-lex.l b/src/glsl/glcpp/glcpp-lex.l
index fd28711d12c..a029f620367 100644
--- a/src/glsl/glcpp/glcpp-lex.l
+++ b/src/glsl/glcpp/glcpp-lex.l
@@ -260,6 +260,8 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]?
}
"##" {
+ if (parser->is_gles)
+ glcpp_error(yylloc, yyextra, "Token pasting (##) is illegal in GLES");
return PASTE;
}