From: Martin Liska Date: Mon, 23 May 2022 11:54:53 +0000 (+0200) Subject: tilepro: fix missing ARRAY_SIZE macro X-Git-Tag: basepoints/gcc-14~6497 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=63798f67dcc848dcd110ce222b97304565c9ea29;p=thirdparty%2Fgcc.git tilepro: fix missing ARRAY_SIZE macro gcc/ChangeLog: * config/tilepro/gen-mul-tables.cc (ARRAY_SIZE): Add new macro. --- diff --git a/gcc/config/tilepro/gen-mul-tables.cc b/gcc/config/tilepro/gen-mul-tables.cc index 798766a723b..52183982f65 100644 --- a/gcc/config/tilepro/gen-mul-tables.cc +++ b/gcc/config/tilepro/gen-mul-tables.cc @@ -90,6 +90,8 @@ typedef long long MUL_TYPE; #define MIN(x, y) ((x) <= (y) ? (x) : (y)) #define MAX(x, y) ((x) >= (y) ? (x) : (y)) +#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0])) + /* For this program a unary op is one which has only one nonconstant operand. So shift left by 5 is considered unary. */ typedef MUL_TYPE (*unary_op_func) (MUL_TYPE);