diff options
author | Luca Muscariello <lumuscar+fdio@cisco.com> | 2019-01-24 16:32:25 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2019-01-24 16:32:25 +0000 |
commit | 9fc2b9ec49c54ec2d5f0164bbedc1c78732c464c (patch) | |
tree | c7ebcf4c83b5c2f71318bc69c6f6915aaac7ae2a /libparc/parc/algol/parc_Object.h | |
parent | cada1143501a48effc483e3873596c22849926b5 (diff) | |
parent | 097e69e6daeefc84fd271babbdc1b47dfe4c01e5 (diff) |
Merge "Add support for ubuntu18.04 packages."
Diffstat (limited to 'libparc/parc/algol/parc_Object.h')
-rw-r--r-- | libparc/parc/algol/parc_Object.h | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/libparc/parc/algol/parc_Object.h b/libparc/parc/algol/parc_Object.h index 0f3a932b..ac7e9652 100644 --- a/libparc/parc/algol/parc_Object.h +++ b/libparc/parc/algol/parc_Object.h @@ -42,8 +42,7 @@ #include <stdint.h> #include <time.h> -#include <LongBow/runtime.h> -#include <LongBow/longBow_Compiler.h> +#include <parc/assert/parc_Assert.h> #include <parc/algol/parc_CMacro.h> //#include <parc/algol/parc_JSON.h> @@ -598,8 +597,11 @@ const PARCObjectDescriptor *parcObject_SetDescriptor(PARCObject *object, const P * Create new `PARCObjectDescriptor` based on an existing `PARCObjectDescriptor.` * The new `PARCObjectDescriptor` uses the existing `PARCObjectDescriptor` as the super-type of the new descriptor. */ + +#ifdef __clang__ #define parcObject_Extends(_subtype, _superType, ...) \ - LongBowCompiler_IgnoreInitializerOverrides \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Winitializer-overrides\"") \ parcObjectDescriptor_Declaration(_subtype) = { \ .super = &parcObject_DescriptorName(_superType), \ .name = #_subtype, \ @@ -619,8 +621,33 @@ const PARCObjectDescriptor *parcObject_SetDescriptor(PARCObject *object, const P .typeState = NULL, \ __VA_ARGS__ \ }; \ - LongBowCompiler_WarnInitializerOverrides \ + _Pragma("GCC diagnostic pop") \ const PARCObjectDescriptor parcObject_DescriptorName(_subtype) +#else + #define parcObject_Extends(_subtype, _superType, ...) \ + _Pragma("GCC diagnostic ignored \"-Woverride-init\"") \ + parcObjectDescriptor_Declaration(_subtype) = { \ + .super = &parcObject_DescriptorName(_superType), \ + .name = #_subtype, \ + .objectSize = 0, \ + .objectAlignment = 0, \ + .destroy = NULL, \ + .destructor = NULL, \ + .release = NULL, \ + .copy = NULL, \ + .toString = NULL, \ + .equals = NULL, \ + .compare = NULL, \ + .hashCode = NULL, \ + .toJSON = NULL, \ + .display = NULL, \ + .isLockable = true, \ + .typeState = NULL, \ + __VA_ARGS__ \ + }; \ + _Pragma("GCC diagnostic warning \"-Woverride-init\"") \ + const PARCObjectDescriptor parcObject_DescriptorName(_subtype) +#endif /** * Define a new PARC Object implementation, by composing a new PARC Object Descriptor referencing an old one. |