[go: up one dir, main page]

Skip to content

C sizeof operator not handled well when used without parentheses

Consider this code fragment (real life example from the netatalk codebase):

sizeof *newtable * hash->nchains * 2

astyle v3.6.9 formats this as if the first * is a multiplication operator rather than a pointer operator

sizeof * newtable * hash->nchains * 2

This is with the 1tbs baseline styles; haven't tried other defaults yet