From 7ac6182d4c4f0aba77d72683fc4a7243c03f4700 Mon Sep 17 00:00:00 2001 From: Cary R Date: Wed, 31 May 2023 20:00:22 -0700 Subject: [PATCH] Update to compile with older GCC versions --- tgt-vvp/vvp_proc_loops.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tgt-vvp/vvp_proc_loops.c b/tgt-vvp/vvp_proc_loops.c index 165d239af..c3fedd485 100644 --- a/tgt-vvp/vvp_proc_loops.c +++ b/tgt-vvp/vvp_proc_loops.c @@ -24,9 +24,9 @@ # include # include -const unsigned LABEL_NONE = UINT_MAX; -static unsigned break_label = LABEL_NONE; -static unsigned continue_label = LABEL_NONE; +#define BRK_CONT_LABEL_NONE UINT_MAX +static unsigned break_label = BRK_CONT_LABEL_NONE; +static unsigned continue_label = BRK_CONT_LABEL_NONE; #define PUSH_JUMPS(bl, cl) do { \ save_break_label = break_label; \ @@ -44,7 +44,7 @@ static unsigned continue_label = LABEL_NONE; #pragma GCC diagnostic ignored "-Wunused-parameter" int show_stmt_break(ivl_statement_t net, ivl_scope_t sscope) { - if (break_label == LABEL_NONE) { + if (break_label == BRK_CONT_LABEL_NONE) { fprintf(stderr, "vvp.tgt: error: 'break' not in a loop?!\n"); return 1; } @@ -55,7 +55,7 @@ int show_stmt_break(ivl_statement_t net, ivl_scope_t sscope) int show_stmt_continue(ivl_statement_t net, ivl_scope_t sscope) { - if (continue_label == LABEL_NONE) { + if (continue_label == BRK_CONT_LABEL_NONE) { fprintf(stderr, "vvp.tgt: error: 'continue' not in a loop?!\n"); return 1; }