Skip to content

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
self.emit(lparen)
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
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
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