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

Fix macro "default" call at item level #2674

Merged
merged 2 commits into from
Oct 17, 2023

Conversation

P-E-P
Copy link
Member

@P-E-P P-E-P commented Oct 10, 2023

A macro default called at item level was previously rejected.

Fixes #2655

P-E-P added 2 commits October 10, 2023 14:41
The parser was too agressive and did reject any line beginning with
default even if this was a macro call.

gcc/rust/ChangeLog:

	* parse/rust-parse-impl.h (Parser::parse_item): Relax constraints
	around default identifier at item scope to accept "default" macros.

Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
This test highlight the fix required for Rust-GCC#2655.

gcc/testsuite/ChangeLog:

	* rust/compile/parse_item_default_macro.rs: New test.

Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
@P-E-P P-E-P added this to the GCC 14.1 release milestone Oct 10, 2023
@P-E-P P-E-P requested a review from CohenArthur October 10, 2023 12:56
@P-E-P P-E-P self-assigned this Oct 10, 2023
@P-E-P P-E-P marked this pull request as ready for review October 10, 2023 12:56
Copy link
Member

@CohenArthur CohenArthur left a comment

Choose a reason for hiding this comment

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

good catch

@CohenArthur CohenArthur added this pull request to the merge queue Oct 17, 2023
Merged via the queue into Rust-GCC:master with commit 6658219 Oct 17, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Macro call named default
2 participants