From 82d46a5e1a6affe01af4f60a1492d04c121a2ab7 Mon Sep 17 00:00:00 2001 From: "Frederick C. Kurz" Date: Fri, 10 Jul 2015 12:50:38 -0400 Subject: [PATCH] Changes to ivl_target.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. --- ivl_target.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ivl_target.h b/ivl_target.h index 959a6fb65..dc56b9a7f 100644 --- a/ivl_target.h +++ b/ivl_target.h @@ -201,7 +201,11 @@ typedef enum ivl_dis_domain_e { IVL_DIS_CONTINUOUS = 2 } ivl_dis_domain_t; +#if defined(__cplusplus) && !defined(__GNUC__) +typedef enum ivl_drive_e : unsigned int { +#else typedef enum ivl_drive_e { +#endif IVL_DR_HiZ = 0, IVL_DR_SMALL = 1, IVL_DR_MEDIUM = 2, @@ -243,7 +247,11 @@ typedef enum ivl_expr_type_e { IVL_EX_UNARY = 14 } ivl_expr_type_t; +#if defined(__cplusplus) && !defined(__GNUC__) +typedef enum ivl_select_type_e : unsigned int { +#else typedef enum ivl_select_type_e { +#endif IVL_SEL_OTHER = 0, IVL_SEL_IDX_UP = 1, IVL_SEL_IDX_DOWN = 2 @@ -345,7 +353,11 @@ typedef enum ivl_path_edge_e { /* Processes are initial, always, or final blocks with a statement. This is the type of the ivl_process_t object. */ +#if defined(__cplusplus) && !defined(__GNUC__) +typedef enum ivl_process_type_e : unsigned int { +#else typedef enum ivl_process_type_e { +#endif IVL_PR_INITIAL = 0, IVL_PR_ALWAYS = 1, IVL_PR_FINAL = 2 @@ -431,7 +443,11 @@ typedef enum ivl_sfunc_as_task_e { /* This is the type of a variable, and also used as the type for an expression. */ +#if defined(__cplusplus) && !defined(__GNUC__) +typedef enum ivl_variable_type_e : unsigned int { +#else typedef enum ivl_variable_type_e { +#endif IVL_VT_VOID = 0, /* Not used */ IVL_VT_NO_TYPE = 1, /* Place holder for missing/unknown type. */ IVL_VT_REAL = 2,