> cppcheck --version Cppcheck 2.18.3
File test.c:
test.c
struct foo { int foo; }; struct bar { struct foo foo; }; struct baz { struct bar bar; }; int main(void) { struct baz baz = {.bar = {.foo = {.foo = 1}}}; return 0; }
The error:
> cppcheck test.c Checking test.c ... test.c:14:34: error: Expression '.foo={.foo=1}' depends on order of evaluation of side effects [unknownEvaluationOrder] struct baz baz = {.bar = {.foo = {.foo = 1}}}; ^
Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/14431
Log in to post a comment.
File
test.c:The error:
Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/14431