aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/glsl_parser.yy
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/glsl/glsl_parser.yy')
-rw-r--r--mesalib/src/glsl/glsl_parser.yy10
1 files changed, 7 insertions, 3 deletions
diff --git a/mesalib/src/glsl/glsl_parser.yy b/mesalib/src/glsl/glsl_parser.yy
index d8e589d49..fa6e2053a 100644
--- a/mesalib/src/glsl/glsl_parser.yy
+++ b/mesalib/src/glsl/glsl_parser.yy
@@ -1714,13 +1714,17 @@ struct_declaration_list:
;
struct_declaration:
- type_specifier struct_declarator_list ';'
+ fully_specified_type struct_declarator_list ';'
{
void *ctx = state;
- ast_fully_specified_type *type = new(ctx) ast_fully_specified_type();
+ ast_fully_specified_type *const type = $1;
type->set_location(yylloc);
- type->specifier = $1;
+ if (type->qualifier.flags.i != 0)
+ _mesa_glsl_error(&@1, state,
+ "only precision qualifiers may be applied to "
+ "structure members");
+
$$ = new(ctx) ast_declarator_list(type);
$$->set_location(yylloc);