goblint / cil

C Intermediate Language
https://goblint.github.io/cil/
Other
40 stars 16 forks source link

`Warning: Ignoring un-named typedef that does not introduce a struct or enumeration type` for `__attribute__((fallthrough));` on null statement #71

Closed michael-schwarz closed 2 years ago

michael-schwarz commented 2 years ago

Code that includes the fallthrough statement attribute (https://gcc.gnu.org/onlinedocs/gcc/Statement-Attributes.html) produces this unrelated warning.

int main() {
    int a =5;

    switch(a) {
        case 5:
            a = 7; ; __attribute__((__fallthrough__));
        default:
            a = 8;
    }

}

This is a low priority issue discovered during https://github.com/goblint/bench/issues/16 and I opened it mostly such that we can refer to it when we see this error message.

michael-schwarz commented 2 years ago

Closed via 5bc7361d2a4244062039f4b52618f07b88c4632f