Hello,

On Fri, 27 Nov 2020, Tyge Løvset wrote:

Is this a known bug, or regression? 

Known bug.

I tried to follow the code in parse_btype() in tccgen.c for the missing
struct member symbol lookup check, but didn't succeed so far:

      } else {
            c = 0;
            flexible = 0;
            while (tok != '}') {
                if (!parse_btype(&btype, &ad1)) {
    skip(';');
    continue;
}

Member lookup is linear, so checking for duplicates is quadratic, so TCC doesn't bother to do it. The check would belong to struct_decl, not parse_btype, probably involving find_field before adding it.


Ciao,
Michael.
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to