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

fixes #22101; std/pegs with nim cpp --mm:orc --exceptions:goto creates invalid C++ #24531

Merged
merged 3 commits into from
Dec 12, 2024

Conversation

ringabout
Copy link
Member

fixes #22101

The old implementation generates

auto T = value; for the cpp backend which causes problems for goto exceptions. This PR puts the declaration of T to the cpsLocals parts and makes it compatible with goto exceptions.

@ringabout ringabout marked this pull request as draft December 12, 2024 13:39
@ringabout ringabout marked this pull request as ready for review December 12, 2024 13:47
@Araq Araq added the merge_when_passes_CI mergeable once green label Dec 12, 2024
@Araq Araq merged commit f7a461a into devel Dec 12, 2024
21 checks passed
@Araq Araq deleted the pr_cpp_goto branch December 12, 2024 21:56
Copy link
Contributor

Thanks for your hard work on this PR!
The lines below are statistics of the Nim compiler built from f7a461a

Hint: mm: orc; opt: speed; options: -d:release
178031 lines; 8.687s; 653.629MiB peakmem

narimiran pushed a commit that referenced this pull request Jan 14, 2025
…s invalid C++ (#24531)

fixes #22101

The old implementation generates

`auto T = value;` for the cpp backend which causes problems for goto
exceptions. This PR puts the declaration of `T` to the cpsLocals parts
and makes it compatible with goto exceptions.

(cherry picked from commit f7a461a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge_when_passes_CI mergeable once green
Projects
None yet
Development

Successfully merging this pull request may close these issues.

std/pegs with nim cpp --mm:orc --exceptions:goto creates invalid C++
2 participants