aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2020-02-17 16:33:55 +0100
committerAndreas Schneider <asn@cryptomilk.org>2020-02-23 09:49:33 +0100
commitebcde1de42588e697e0f4eaed9f6f0ea6a77a2cd (patch)
treee3a2cc770011f85c43a29a6c026e2dd103e22739
parent38cda18626fc86209068d8282ac41edea6967b88 (diff)
downloadrneovim-ebcde1de42588e697e0f4eaed9f6f0ea6a77a2cd.tar.gz
rneovim-ebcde1de42588e697e0f4eaed9f6f0ea6a77a2cd.tar.bz2
rneovim-ebcde1de42588e697e0f4eaed9f6f0ea6a77a2cd.zip
nvim:eval: Fix enum declaration for ListLenSpecials
Instead of declaring an enum, this creates a global variable. As gcc10 uses -fno-common by default, global variables declared with the same name more than once is not allowed anymore revealing this issue. Each time this header is included, we define the enum name as a global variable. See also https://bugzilla.redhat.com/show_bug.cgi?id=1799680
-rw-r--r--src/nvim/eval/typval.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/eval/typval.h b/src/nvim/eval/typval.h
index 008453b87f..5afdedff75 100644
--- a/src/nvim/eval/typval.h
+++ b/src/nvim/eval/typval.h
@@ -33,7 +33,7 @@ typedef double float_T;
enum { DO_NOT_FREE_CNT = (INT_MAX / 2) };
/// Additional values for tv_list_alloc() len argument
-enum {
+enum ListLenSpecials {
/// List length is not known in advance
///
/// To be used when there is neither a way to know how many elements will be
@@ -49,7 +49,7 @@ enum {
///
/// To be used when it looks impractical to determine list length.
kListLenMayKnow = -3,
-} ListLenSpecials;
+};
/// Maximal possible value of varnumber_T variable
#define VARNUMBER_MAX INT64_MAX