From d105412503ea250e07d3cb008f10f60e6e48bf8a Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 5 Aug 2011 08:12:52 +0200 Subject: mesa pixman git update 5 aug 2011 --- mesalib/src/glsl/ast_to_hir.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'mesalib/src/glsl/ast_to_hir.cpp') diff --git a/mesalib/src/glsl/ast_to_hir.cpp b/mesalib/src/glsl/ast_to_hir.cpp index c0524bf0b..7da146119 100644 --- a/mesalib/src/glsl/ast_to_hir.cpp +++ b/mesalib/src/glsl/ast_to_hir.cpp @@ -2399,12 +2399,12 @@ ast_declarator_list::hir(exec_list *instructions, decl_type = this->type->specifier->glsl_type(& type_name, state); if (this->declarations.is_empty()) { - /* The only valid case where the declaration list can be empty is when - * the declaration is setting the default precision of a built-in type - * (e.g., 'precision highp vec4;'). - */ - if (decl_type != NULL) { + /* Warn if this empty declaration is not for declaring a structure. + */ + if (this->type->specifier->structure == NULL) { + _mesa_glsl_warning(&loc, state, "empty declaration"); + } } else { _mesa_glsl_error(& loc, state, "incomplete declaration"); } -- cgit v1.2.3