You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Wrap some multi-line macros in do { ... } while(0) in symtable.c #119981
While I was implementing #119976, I observed that some macros are not guarded against possible constructions because their content is only wrapped in {} but not in the classical do { ... } while(0) construction.
For instance, the current VISIT macro sometimes requires the semi-colon and sometimes not depending on how it is used, which I find a bit confusing. I think it's preferrable to always require to add the ;.
Yes, that's a good idea. Since I was going offline in a few minutes, could you either close this issue or edit the title so that we can perhaps track other files?
Activity
gh-119981: Use do while(0) in some symtable.c multi-line macros (#119982
sobolevn commentedon Jun 3, 2024
There are similar patterns in
compile.c, maybe it is also worth taking a look? 🤔picnixz commentedon Jun 3, 2024
Yes, that's a good idea. Since I was going offline in a few minutes, could you either close this issue or edit the title so that we can perhaps track other files?
sobolevn commentedon Jun 3, 2024
I prefer to open new ones for each piece of work :)
Thanks again!
pythongh-119981: Use do while(0) in some symtable.c multi-line macros (…
pythongh-119981: Use do while(0) in some symtable.c multi-line macros (…
pythongh-119981: Use do while(0) in some symtable.c multi-line macros (…
pythongh-119981: Use do while(0) in some symtable.c multi-line macros (…