*/
if (op[0]->type == glsl_type::void_type || op[1]->type == glsl_type::void_type) {
- _mesa_glsl_error(& loc, state, "`%s': wrong operand types: "
- "no operation `%1$s' exists that takes a left-hand "
+ _mesa_glsl_error(& loc, state, "wrong operand types: "
+ "no operation `%s' exists that takes a left-hand "
"operand of type 'void' or a right operand of type "
"'void'", (this->oper == ast_equal) ? "==" : "!=");
error_emitted = true;
validate_array_dimensions(const glsl_type *t,
struct _mesa_glsl_parse_state *state,
YYLTYPE *loc) {
+ const glsl_type *top = t;
if (t->is_array()) {
t = t->fields.array;
while (t->is_array()) {
if (t->is_unsized_array()) {
_mesa_glsl_error(loc, state,
"only the outermost array dimension can "
- "be unsized",
- t->name);
+ "be unsized, but got %s",
+ top->name);
break;
}
t = t->fields.array;
if (!state->has_geometry_shader()) {
_mesa_glsl_error(& @3, state,
"#version 150 max_vertices qualifier "
- "specified", $3);
+ "specified");
}
}
# define YYLTYPE_IS_TRIVIAL 1
extern void _mesa_glsl_error(YYLTYPE *locp, _mesa_glsl_parse_state *state,
- const char *fmt, ...);
+ const char *fmt, ...) PRINTFLIKE(3, 4);
struct _mesa_glsl_parse_state {