mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-27 14:12:36 +00:00
remove another hardcoded -std=gmqcc case
This commit is contained in:
parent
d8254cede0
commit
0626bbef8e
1 changed files with 19 additions and 26 deletions
45
parser.c
45
parser.c
|
@ -4561,35 +4561,28 @@ static bool parse_variable(parser_t *parser, ast_block *localblock, bool nofield
|
|||
{
|
||||
/* other globals */
|
||||
if (old) {
|
||||
if (opts.standard == COMPILER_GMQCC) {
|
||||
parseerror(parser, "global `%s` already declared here: %s:%i",
|
||||
var->name, ast_ctx(old).file, ast_ctx(old).line);
|
||||
if (parsewarning(parser, WARN_DOUBLE_DECLARATION,
|
||||
"global `%s` already declared here: %s:%i",
|
||||
var->name, ast_ctx(old).file, ast_ctx(old).line))
|
||||
{
|
||||
retval = false;
|
||||
goto cleanup;
|
||||
} else {
|
||||
if (parsewarning(parser, WARN_DOUBLE_DECLARATION,
|
||||
"global `%s` already declared here: %s:%i",
|
||||
var->name, ast_ctx(old).file, ast_ctx(old).line))
|
||||
{
|
||||
retval = false;
|
||||
goto cleanup;
|
||||
}
|
||||
proto = (ast_value*)old;
|
||||
if (!ast_istype(old, ast_value)) {
|
||||
parseerror(parser, "internal error: not an ast_value");
|
||||
retval = false;
|
||||
proto = NULL;
|
||||
goto cleanup;
|
||||
}
|
||||
if (!parser_check_qualifiers(parser, var, proto)) {
|
||||
retval = false;
|
||||
proto = NULL;
|
||||
goto cleanup;
|
||||
}
|
||||
proto->expression.flags |= var->expression.flags;
|
||||
ast_delete(var);
|
||||
var = proto;
|
||||
}
|
||||
proto = (ast_value*)old;
|
||||
if (!ast_istype(old, ast_value)) {
|
||||
parseerror(parser, "internal error: not an ast_value");
|
||||
retval = false;
|
||||
proto = NULL;
|
||||
goto cleanup;
|
||||
}
|
||||
if (!parser_check_qualifiers(parser, var, proto)) {
|
||||
retval = false;
|
||||
proto = NULL;
|
||||
goto cleanup;
|
||||
}
|
||||
proto->expression.flags |= var->expression.flags;
|
||||
ast_delete(var);
|
||||
var = proto;
|
||||
}
|
||||
if (opts.standard == COMPILER_QCC &&
|
||||
(old = parser_find_field(parser, var->name)))
|
||||
|
|
Loading…
Reference in a new issue