Skip to content

Fix break statement in presence of labels#742

Merged
bnoordhuis merged 3 commits intoquickjs-ng:masterfrom
bnoordhuis:fix741
Dec 4, 2024
Merged

Fix break statement in presence of labels#742
bnoordhuis merged 3 commits intoquickjs-ng:masterfrom
bnoordhuis:fix741

Conversation

@bnoordhuis
Copy link
Copy Markdown
Contributor

In this snippet...

for (;;) label: break

...the break statement jumped back to the start of the loop instead of out of the loop.

Fixes: #741

@saghul
Copy link
Copy Markdown
Contributor

saghul commented Dec 4, 2024

Sweet!

In this snippet...

    for (;;) label: break

...the break statement jumped back to the start of the loop instead of
*out* of the loop.

Fixes: quickjs-ng#741
@bnoordhuis
Copy link
Copy Markdown
Contributor Author

Guess it's because I'm using an older version of gcc... third time's the charm, right?

@bnoordhuis bnoordhuis merged commit 66732e7 into quickjs-ng:master Dec 4, 2024
@bnoordhuis bnoordhuis deleted the fix741 branch December 4, 2024 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Breaks and labels interact incorrectly

2 participants