From: Eric Anholt Date: Wed, 31 Mar 2010 09:37:51 +0000 (-1000) Subject: Test that main doesn't take any parameters. X-Git-Tag: mesa-7.9-rc1~1173^2~625^2~499 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=174cc03edcd6861ba416cc1afb19d4d43933ac84;p=platform%2Fupstream%2Fmesa.git Test that main doesn't take any parameters. Fixes main2.vert. --- diff --git a/ast_to_hir.cpp b/ast_to_hir.cpp index 1f81a94..a0fe37b 100644 --- a/ast_to_hir.cpp +++ b/ast_to_hir.cpp @@ -1462,6 +1462,12 @@ ast_function_definition::hir(exec_list *instructions, _mesa_glsl_error(& loc, state, "main() must return void"); } + + if (!parameters.is_empty()) { + YYLTYPE loc = this->get_location(); + + _mesa_glsl_error(& loc, state, "main() must not take any parameters"); + } } /* Finish storing the information about this new function in its signature.