Re: [RFC PATCH 1/2] build_bug.h: add wrapper for _Static_assert

2021-07-01 Thread Tom Rini
On Tue, May 18, 2021 at 11:19:46AM +0200, Rasmus Villemoes wrote: > [Linux commit 6bab69c65013bed5fce9f101a64a84d0385b3946] > > BUILD_BUG_ON() is a little annoying, since it cannot be used outside > function scope. So one cannot put assertions about the sizeof() a > struct next to the struct

Re: [RFC PATCH 1/2] build_bug.h: add wrapper for _Static_assert

2021-05-19 Thread Simon Glass
On Tue, 18 May 2021 at 03:19, Rasmus Villemoes wrote: > > [Linux commit 6bab69c65013bed5fce9f101a64a84d0385b3946] > > BUILD_BUG_ON() is a little annoying, since it cannot be used outside > function scope. So one cannot put assertions about the sizeof() a > struct next to the struct definition,

[RFC PATCH 1/2] build_bug.h: add wrapper for _Static_assert

2021-05-18 Thread Rasmus Villemoes
[Linux commit 6bab69c65013bed5fce9f101a64a84d0385b3946] BUILD_BUG_ON() is a little annoying, since it cannot be used outside function scope. So one cannot put assertions about the sizeof() a struct next to the struct definition, but has to hide that in some more or less arbitrary function.