tccgen: scope levels for local symbols

... for fast redeclaration checks

Also, check function parameters too:
    void foo(int a) { int a; ... }

Also, try to fix struct/union/enum's on different scopes:
    { struct xxx { int x; };
         { struct xxx { int y; }; ... }}
and some (probably not all) combination with incomplete
declarations "struct xxx;"

Replaces 2bfedb1867
and 07d896c8e5

Fixes cf95ac399c
This commit is contained in:
grischka
2016-05-05 10:39:09 +02:00
parent 0fbc77cac6
commit caebbc3ee1
3 changed files with 30 additions and 26 deletions

View File

@ -1764,7 +1764,6 @@ static const FlagDef flag_defs[] = {
{ offsetof(TCCState, old_struct_init_code), 0, "old-struct-init-code" },
{ offsetof(TCCState, dollars_in_identifiers), 0, "dollars-in-identifiers" },
{ offsetof(TCCState, normalize_inc_dirs), 0, "normalize-inc-dirs" },
{ offsetof(TCCState, no_type_redef_check), FD_INVERT, "type-redefinition-check" },
};
/* set/reset a flag */