From 093e7eb2c8c2ecc11de03fbf9b46574549903748 Mon Sep 17 00:00:00 2001 From: "Frederick C. Kurz" Date: Fri, 10 Jul 2015 12:50:38 -0400 Subject: [PATCH] Changes to netlist.h Changes so "Microsoft Visual Studio Express 2015 RC Web" could build it without a bunch of runtime errors and crashes during regression testing. When declaring an bitfield variable of type enum in a struct, the enum has to have an underlying integer type for MSVC++ when compiling a C++ file, and for these cases, it had to be unsigned integer for everything to work okay during regression testing. --- netlist.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/netlist.h b/netlist.h index 8a3e3f98f..134f56f38 100644 --- a/netlist.h +++ b/netlist.h @@ -102,7 +102,11 @@ class Link { friend class NexusSet; public: +#if defined(__cplusplus) && !defined(__GNUC__) + enum DIR : unsigned int { PASSIVE, INPUT, OUTPUT }; +#else enum DIR { PASSIVE, INPUT, OUTPUT }; +#endif private: // Only NetPins can create/delete Link objects Link(); @@ -619,7 +623,11 @@ class NetDelaySrc : public NetObj { class PortType { public: +#if defined(__cplusplus) && !defined(__GNUC__) + enum Enum : unsigned int { NOT_A_PORT, PIMPLICIT, PINPUT, POUTPUT, PINOUT, PREF }; +#else enum Enum { NOT_A_PORT, PIMPLICIT, PINPUT, POUTPUT, PINOUT, PREF }; +#endif /* * Merge Port types (used to construct a sane combined port-type @@ -647,7 +655,11 @@ struct PortInfo class NetNet : public NetObj, public PortType { public: +#if defined(__cplusplus) && !defined(__GNUC__) + enum Type : unsigned int { NONE, IMPLICIT, IMPLICIT_REG, INTEGER, WIRE, TRI, TRI1, +#else enum Type { NONE, IMPLICIT, IMPLICIT_REG, INTEGER, WIRE, TRI, TRI1, +#endif SUPPLY0, SUPPLY1, WAND, TRIAND, TRI0, WOR, TRIOR, REG, UNRESOLVED_WIRE };