On Wed, Jun 18, 2025 at 08:33:27PM -0700, Marc Herbert wrote: > 2. Are C99 declarations acceptable. To comment on this one, since I was linked - I'd say there's definite pros and cons to C99 declarations to be aware of pros: - not separating the definition and the assignment is better style, and does lead to a reduction in bugs - discourages reusing the same variable for multiple purposes, better and more readable code the big con: - they interact badly with gotos, you can get undefined behaviour from using a variable that wasn't actually defined _and the compiler will not warn you_ So, same issue as __cleanup. There are no downsides to c99 style for loop declations that I've ever seen, and we have seen definite cases where using those would have prevented bugs. But the issue with gotos is worth highlighting. Be careful when using them in code that hasn't been converted to __cleanup.