mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
[qfcc] Catch duplicate field definitions
This commit is contained in:
parent
e298904dc0
commit
597890dda1
1 changed files with 6 additions and 0 deletions
|
@ -741,6 +741,9 @@ struct_decl
|
|||
$1->sy_type = sy_var;
|
||||
$1->visibility = current_visibility;
|
||||
symtab_addsymbol (current_symtab, $1);
|
||||
if (!$1->table) {
|
||||
error (0, "duplicate field `%s'", $1->name);
|
||||
}
|
||||
}
|
||||
| var_decl
|
||||
{
|
||||
|
@ -751,6 +754,9 @@ struct_decl
|
|||
$1->sy_type = sy_var;
|
||||
$1->visibility = current_visibility;
|
||||
symtab_addsymbol (current_symtab, $1);
|
||||
if (!$1->table) {
|
||||
error (0, "duplicate field `%s'", $1->name);
|
||||
}
|
||||
}
|
||||
| var_decl ':' expr %prec COMMA {}
|
||||
| ':' expr %prec COMMA {}
|
||||
|
|
Loading…
Reference in a new issue