Excerpts from Martin Liška's message of Mai 5, 2022 2:16 pm: > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? > Thanks, > Martin > > gcc/d/ChangeLog: > > * longdouble.h: Use ARRAY_SIZE. > > diff --git a/gcc/d/longdouble.h b/gcc/d/longdouble.h > index 1e457ae04d6..2d9695a4309 100644 > --- a/gcc/d/longdouble.h > +++ b/gcc/d/longdouble.h > @@ -117,7 +117,7 @@ public: > private: > /* Including gcc/real.h presents too many problems, so just > statically allocate enough space for REAL_VALUE_TYPE. */ > - long realvalue[(2 + (16 + sizeof (long)) / sizeof (long))]; > + long realvalue[(2 + (16 + ARRAY_SIZE (long))]; > }; > > /* Declared, but "volatile" is not required. */ >
Hi, This D front-end change doesn't look right to me, besides the slight difference in parentheses meaning the calculation would be off by some measure - (2 + (16 + N) / N) => 7 vs. (2 + 16 + N) => 22 - if I understand the ARRAY_SIZE macro correctly, it wouldn't even generate valid code either. Regards, Iain.