Open
Description
Description
Just as the title mentioned, solc --gas
does not output a gas esitimation.
Environment
- Compiler version: 0.8.27-develop.2024.6.25+commit.ce4be6e1.Darwin.appleclang
- Operating system: Macos M2 Sonoma 14.5
Steps to Reproduce
pragma solidity ^0.8.0;
contract Test {
uint[] array;
function testGasEstimation() public {
array.push(1);
}
}
Execute the above example and the output is
Warning: This is a pre-release compiler version, please do not use it in production.
Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.
No gas estimation found.