From c18eda79b1c99b4087cfb4c36cea42520437c905 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Mon, 4 Feb 2019 12:22:16 +0100 Subject: [PATCH 1/3] Restrict the availability of EVMC_DEPRECATED Define EVMC_DEPRECATED attribute only for GCC 6+ because in older versions attributes cannot be applied to enum elements. --- CHANGELOG.md | 7 +++++++ include/evmc/evmc.h | 14 ++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d2812a4..a50c87b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [6.1.1] - Unreleased + +- Fixed: [[#190](https://github.com/ethereum/evmc/pull/190)] + Compilation with GCC 5 because of the "deprecated" attribute applied + to an enum element. + ## [6.1.0] - 2019-01-24 - Added: [[#174](https://github.com/ethereum/evmc/pull/174)] @@ -103,6 +109,7 @@ Constantinople: Storage status is reported back from `evmc_set_storage()`. +[6.1.1]: https://github.com/ethereum/evmc/compare/v6.1.0...release/6.1 [6.1.0]: https://github.com/ethereum/evmc/releases/tag/v6.1.0 [6.0.2]: https://github.com/ethereum/evmc/releases/tag/v6.0.2 [6.0.1]: https://github.com/ethereum/evmc/releases/tag/v6.0.1 diff --git a/include/evmc/evmc.h b/include/evmc/evmc.h index fbce040..18384b3 100644 --- a/include/evmc/evmc.h +++ b/include/evmc/evmc.h @@ -11,13 +11,15 @@ #ifndef EVMC_H #define EVMC_H -#ifdef __has_attribute -#if __has_attribute(deprecated) +#if defined(__clang__) || (defined(__GNUC__) && __GNUC__ >= 6) +/** + * Portable declaration of "deprecated" attribute. + * + * Available for clang and GCC 6+ compilers. The older GCC compilers know + * this attribute, but it cannot be applied to enum elements. + */ #define EVMC_DEPRECATED __attribute__((deprecated)) -#endif -#endif - -#ifndef EVMC_DEPRECATED +#else #define EVMC_DEPRECATED #endif From 2cbfbca6997a28c512a6dd2449b8df92870f199d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Wed, 13 Feb 2019 11:38:31 +0100 Subject: [PATCH 2/3] docs: Document elements of evmc_revision --- CHANGELOG.md | 2 ++ include/evmc/evmc.h | 46 +++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a50c87b..1c805ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## [6.1.1] - Unreleased +- Added: [[#192](https://github.com/ethereum/evmc/pull/192)] + Documentation of elements of evmc_revision. - Fixed: [[#190](https://github.com/ethereum/evmc/pull/190)] Compilation with GCC 5 because of the "deprecated" attribute applied to an enum element. diff --git a/include/evmc/evmc.h b/include/evmc/evmc.h index 18384b3..da0f136 100644 --- a/include/evmc/evmc.h +++ b/include/evmc/evmc.h @@ -708,24 +708,66 @@ typedef enum evmc_set_option_result (*evmc_set_option_fn)(struct evmc_instance* /** * EVM revision. * - * The revision of the EVM specification based on the Ethereum - * upgrade / hard fork codenames. + * The revision of the EVM specification based on the Ethereum + * upgrade / hard fork codenames. */ enum evmc_revision { + /** + * The Frontier revision. + * + * The one Ethereum launched with. + */ EVMC_FRONTIER = 0, + + /** + * The Homestead revision. + * + * https://eips.ethereum.org/EIPS/eip-606 + */ EVMC_HOMESTEAD = 1, + + /** + * The Tangerine Whistle revision. + * + * https://eips.ethereum.org/EIPS/eip-608 + */ EVMC_TANGERINE_WHISTLE = 2, + + /** + * The Spurious Dragon revision. + * + * https://eips.ethereum.org/EIPS/eip-607 + */ EVMC_SPURIOUS_DRAGON = 3, + + /** + * The Byzantium revision. + * + * https://eips.ethereum.org/EIPS/eip-609 + */ EVMC_BYZANTIUM = 4, + + /** + * The Constantinople revision. + * + * https://eips.ethereum.org/EIPS/eip-1013 + */ EVMC_CONSTANTINOPLE = 5, /** * Reserved for the post-Constantinople upgrade. The name is likely to * be changed, but the assigned number should stay. + * + * The spec draft: https://github.com/ethereum/EIPs/pull/1716. */ EVMC_CONSTANTINOPLE2 = 6, + /** + * The Istanbul revision. + * + * The spec draft: https://eips.ethereum.org/EIPS/eip-1679. + */ EVMC_ISTANBUL = 7, /** The maximum EVM revision supported. */ From a3e35b5654952a3298024f618c8ffbc09ae3eed2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Wed, 13 Feb 2019 12:02:07 +0100 Subject: [PATCH 3/3] EVMC 6.1.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bump version: 6.1.0 → 6.1.1 --- .bumpversion.cfg | 2 +- CHANGELOG.md | 4 ++-- CMakeLists.txt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index b41a59e..ebca975 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 6.1.0 +current_version = 6.1.1 tag = True commit = True message = EVMC {new_version} diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c805ac..2037576 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## [6.1.1] - Unreleased +## [6.1.1] - 2019-02-13 - Added: [[#192](https://github.com/ethereum/evmc/pull/192)] Documentation of elements of evmc_revision. @@ -111,7 +111,7 @@ Constantinople: Storage status is reported back from `evmc_set_storage()`. -[6.1.1]: https://github.com/ethereum/evmc/compare/v6.1.0...release/6.1 +[6.1.1]: https://github.com/ethereum/evmc/releases/tag/v6.1.1 [6.1.0]: https://github.com/ethereum/evmc/releases/tag/v6.1.0 [6.0.2]: https://github.com/ethereum/evmc/releases/tag/v6.0.2 [6.0.1]: https://github.com/ethereum/evmc/releases/tag/v6.0.1 diff --git a/CMakeLists.txt b/CMakeLists.txt index 12209e6..246e97a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,7 @@ endif() cable_configure_toolchain(DEFAULT cxx11-pic) project(evmc) -set(PROJECT_VERSION 6.1.0) +set(PROJECT_VERSION 6.1.1) cable_set_build_type(DEFAULT Release CONFIGURATION_TYPES Debug Release)