From 7b399ee696036fe6d1acbbb64cd8a15d6a53078d Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 12 Sep 2022 23:31:23 -0700 Subject: Define bit width of NUM type in one place. * lib.h (NUM_BIT): New preprocessor symbol. * arith.c (CNUM_BIT): Preprocessor symbol removed; this same quantity is already known as PTR_BIT in lib.h. (mul, square): Replace CNUM_BIT with PTR_BIT. (comp_trunc, logtrunc, sign_extend, ash): Replace num_bits with NUM_BIT. * struct.c (struct_inst): Replace calculation with NUM_BIT. --- struct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'struct.c') diff --git a/struct.c b/struct.c index 8adf6323..e601cbcd 100644 --- a/struct.c +++ b/struct.c @@ -97,7 +97,7 @@ struct struct_type { struct struct_inst { struct struct_type *type; - cnum id : sizeof (cnum) * CHAR_BIT - TAG_SHIFT; + cnum id : NUM_BIT; unsigned lazy : 1; unsigned dirty : 1; val slot[FLEX_ARRAY]; -- cgit v1.2.3