Skip to content

Verilog: mark unsized literals #1137

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

Merged
merged 1 commit into from
Jun 4, 2025
Merged

Verilog: mark unsized literals #1137

merged 1 commit into from
Jun 4, 2025

Conversation

kroening
Copy link
Member

@kroening kroening commented Jun 3, 2025

This marks unsized literals (e.g., 1, 'b0101, 'z) as such, to enable rules that prohibit their use.

@kroening kroening marked this pull request as ready for review June 3, 2025 20:45
static constant_exprt cond_unsized(constant_exprt expr, bool is_unsized)
{
if(is_unsized)
return unsized(expr);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
return unsized(expr);
return unsized(std::move(expr));

This marks unsized literals (e.g., 1, 'b0101, 'z) as such, to enable rules
that prohibit their use.
@kroening kroening merged commit 9223813 into main Jun 4, 2025
10 checks passed
@kroening kroening deleted the verilog-unsized branch June 4, 2025 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants