-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
gh-124044: protect macros expansions using do-while
constructions (WIP)
#123842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
do-while
constructions
This comment was marked as resolved.
This comment was marked as resolved.
For reviewers: test failures on JIT/aarch64-unknown-linux are known #123681. |
…)` constructions This affects `Python/{assemble,flowgraph,instruction_sequence}.c`.
… (0)` constructions This affects `Python/initconfig.c` and `Python/preconfig.c`.
…)` constructions
…(0)` constructions
…(0)` constructions
f52268c
to
555ca98
Compare
…. } while (0)` constructions
… (0)` constructions
…le (0)` constructions
…e (0)` constructions
…e (0)` constructions
…le (0)` constructions
…le (0)` constructions
…... } while (0)` constructions
555ca98
to
44474eb
Compare
…while (0)` constructions
…while (0)` constructions
…o { ... } while (0)` constructions
0ee7eb4
to
7f1eb83
Compare
…hile (0)` constructions
…e (0)` constructions
…ile (0)` constructions
…le (0)` constructions
…while (0)` constructions
…while (0)` constructions
7f1eb83
to
5c90db8
Compare
do-while
constructionsdo-while
constructions (WIP)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not convinced that this change fix any actual bug. It's more a "coding style"-only change and we usually don't accept them. It's ok to have some coding style changes while fixing a bug, but not have a pull request just for that. Also, this change modifies many files (29) which can lead to conflict in other open pull requests (we have 1700 open pull requests) and downstream patches in Linux distributions.
I don't think it's worth keeping this branch opened, considering that fixing those kind of things is just for cosmetic alignments. Almost all the macros are used correctly (namely, we don't have dangling elses), so we should only change them if needs arise. Surprisingly, I only have one file that has conflicts.... |
Opening for the CI.
I'm just making a large PR and then I'll cherry-pick commits to create branches instead of having hundreds of different branches...
Note for myself:
#define (\w+)\(.*\)\s*\\\s*\{
#\s+define (\w+)\(.*\)\s*\\\s*\{
#define (\w+)\(.*\)\s*\s*\{.*\\
#\s+define (\w+)\(.*\)\s*\s*\{.*\\
#define (\w+)\(.*\)\s*\\\s*
(current module:_dbmodule.c
)#\s+define (\w+)\(.*\)\s*\\\s*
Modifications on
compile.c
is a separate PR. Headers files are untouched since they can be included by third-party libraries.