mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-02-25 20:51:38 +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 */
|
/* other globals */
|
||||||
if (old) {
|
if (old) {
|
||||||
if (opts.standard == COMPILER_GMQCC) {
|
if (parsewarning(parser, WARN_DOUBLE_DECLARATION,
|
||||||
parseerror(parser, "global `%s` already declared here: %s:%i",
|
"global `%s` already declared here: %s:%i",
|
||||||
var->name, ast_ctx(old).file, ast_ctx(old).line);
|
var->name, ast_ctx(old).file, ast_ctx(old).line))
|
||||||
|
{
|
||||||
retval = false;
|
retval = false;
|
||||||
goto cleanup;
|
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 &&
|
if (opts.standard == COMPILER_QCC &&
|
||||||
(old = parser_find_field(parser, var->name)))
|
(old = parser_find_field(parser, var->name)))
|
||||||
|
|
Loading…
Reference in a new issue