tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] struct bug: identical named struct members


From: Tyge Løvset
Subject: [Tinycc-devel] struct bug: identical named struct members
Date: Fri, 27 Nov 2020 19:46:24 +0100

Is this a known bug, or regression? 

struct S {
  int a, a, a, b;
  float a, b, c;
};

int main() {
  struct S s = { 1, 2, 3, 4, 5, 6, 7 };
  printf("%zu: %d %d %f\n", sizeof s, s.a, s.b, s.c);
}

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;
}


reply via email to

[Prev in Thread] Current Thread [Next in Thread]