Skip to content

Tolerate invalid AST from GNU label addresses#1797

Open
thedataking wants to merge 2 commits into
masterfrom
perl/gnu-labels-as-values
Open

Tolerate invalid AST from GNU label addresses#1797
thedataking wants to merge 2 commits into
masterfrom
perl/gnu-labels-as-values

Conversation

@thedataking
Copy link
Copy Markdown
Contributor

Handle unsupported GNU labels-as-values gracefully.

@thedataking thedataking requested a review from ahomescu May 12, 2026 01:27
Copy link
Copy Markdown
Contributor

@ahomescu ahomescu left a comment

Choose a reason for hiding this comment

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

The LabelDecl change should be split into a separate PR.

Comment thread c2rust-transpile/src/c_ast/conversion.rs Outdated
Do not try to export untranslated local labels as it leaves dangling
decl ids behind.
GNU labels-as-values can make the exporter omit nodes. Keep
traversal/comment passes from panicking on the resulting invalid AST.

Missing expression placeholders now translate to an explicit
unsupported-AST error instead of a missing-id panic.
@thedataking thedataking force-pushed the perl/gnu-labels-as-values branch from 62b295a to 0384fe5 Compare May 13, 2026 07:52
@thedataking thedataking requested a review from ahomescu May 13, 2026 07:58
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.

2 participants