Re: static assert cleanup

2022-12-15 Thread Peter Eisentraut
On 09.12.22 11:01, John Naylor wrote: On Fri, Dec 9, 2022 at 2:47 PM Peter Eisentraut > wrote: > > 0003-Move-some-static-assertions-to-better-places.patch > > This moves some that I thought were suboptimally placed but it could be > debated or ref

Re: static assert cleanup

2022-12-14 Thread Peter Eisentraut
On 11.12.22 23:18, Peter Smith wrote: +StaticAssertDecl(SysCacheSize == (int) lengthof(cacheinfo), + "SysCacheSize does not match syscache.c's array"); + static CatCache *SysCache[SysCacheSize]; In almost every example I found of StaticAssertXXX, the lengthof(arr) part came first in the condit

Re: static assert cleanup

2022-12-11 Thread Peter Smith
On Fri, Dec 9, 2022 at 6:47 PM Peter Eisentraut wrote: > > A number of static assertions could be moved to better places. > > We first added StaticAssertStmt() in 2012, which required all static > assertions to be inside function bodies. We then added > StaticAssertDecl() in 2020, which enabled s

Re: static assert cleanup

2022-12-09 Thread John Naylor
On Fri, Dec 9, 2022 at 2:47 PM Peter Eisentraut < peter.eisentr...@enterprisedb.com> wrote: > > 0003-Move-some-static-assertions-to-better-places.patch > > This moves some that I thought were suboptimally placed but it could be > debated or refined. + * We really want ItemPointerData to be exactly