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

A possible lack of warning for no-effect statement "x 2"; #15222

Open
haoyang9804 opened this issue Jun 26, 2024 · 0 comments
Open

A possible lack of warning for no-effect statement "x 2"; #15222

haoyang9804 opened this issue Jun 26, 2024 · 0 comments
Labels

Comments

@haoyang9804
Copy link
Contributor

Description

When I write a no-effect statement such as 1 2, Solidity compiler warns me that it has no effect. But when I substitute 1 with x, no warning is issued. Does "x 2" have any side effect, such as changing the value of x or increase the memory cost?

Environment

  • Compiler version: 0.8.27-develop.2024.6.25 commit.ce4be6e1.Darwin.appleclang
  • Operating system: Macos M2 Sonoma 14.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant