public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-710] tilepro: fix missing ARRAY_SIZE macro
@ 2022-05-23 11:57 Martin Liska
  0 siblings, 0 replies; only message in thread
From: Martin Liska @ 2022-05-23 11:57 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:63798f67dcc848dcd110ce222b97304565c9ea29

commit r13-710-g63798f67dcc848dcd110ce222b97304565c9ea29
Author: Martin Liska <mliska@suse.cz>
Date:   Mon May 23 13:54:53 2022 +0200

    tilepro: fix missing ARRAY_SIZE macro
    
    gcc/ChangeLog:
    
            * config/tilepro/gen-mul-tables.cc (ARRAY_SIZE): Add new macro.

Diff:
---
 gcc/config/tilepro/gen-mul-tables.cc | 2 ++
 1 file changed, 2 insertions(+)

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);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-23 11:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-23 11:57 [gcc r13-710] tilepro: fix missing ARRAY_SIZE macro Martin Liska

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).