mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #13128 from CJ42/docs/assembly-memory-safe
docs: specify memory-safe is available since 0.8.13 for inline assembly
This commit is contained in:
commit
800088e38b
@ -364,8 +364,9 @@ in memory is automatically considered memory-safe and does not need to be annota
|
|||||||
an assembly block as memory-safe, but violate one of the memory assumptions, this **will** lead to incorrect and
|
an assembly block as memory-safe, but violate one of the memory assumptions, this **will** lead to incorrect and
|
||||||
undefined behaviour that cannot easily be discovered by testing.
|
undefined behaviour that cannot easily be discovered by testing.
|
||||||
|
|
||||||
|
The annotation was introduced in version 0.8.13 and is not supported by older compilers.
|
||||||
In case you are developing a library that is meant to be compatible across multiple versions
|
In case you are developing a library that is meant to be compatible across multiple versions
|
||||||
of solidity, you can use a special comment to annotate an assembly block as memory-safe:
|
of Solidity, you can use a special Natspec comment that has the same effect but is ignored in older versions:
|
||||||
|
|
||||||
.. code-block:: solidity
|
.. code-block:: solidity
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user