Skip to content
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

GH-125521: Remove if (true) from generated output to reduce C compiler warnings #125700

Merged
merged 2 commits into from
Oct 22, 2024

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented Oct 18, 2024

@markshannon markshannon changed the title GH-125521: Remove 'if (true)' from generated output to reduce C compiler warnings GH-125521: Remove if (true) from generated output to reduce C compiler warnings Oct 18, 2024
assert lparen.kind == "LPAREN"
first_tkn = tkn_iter.peek()
emit_to(self.out, tkn_iter, "COMMA")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be simpler to just add an unconditional ERROR() macro to the DSL?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That wouldn't prevent anyone writing ERROR_IF(true, ...) so we'd still need to handle it.

@iritkatriel
Copy link
Member

Seems like there is no test for this.

@markshannon markshannon merged commit 57e3c59 into python:main Oct 22, 2024
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants