Re: Compile time assertions

2011-11-15 Thread Steffen Daode Nurpmeso
Ted Unangst wrote [2011-11-14 22:35+0100]: > On Mon, Nov 14, 2011, Steffen Daode Nurpmeso wrote: > > Is there a reason not to use CTASSERT (and some kind of > > member_sizeof())? I couldn't find just any discussion on that in > > marc and gmane. > > Seems like a good idea, but your patch is wrong

Re: Compile time assertions

2011-11-14 Thread Ted Unangst
ounts so much, > i wonder why compile-time assertions are not used at all (AFAIK). > I.e., the simple change in that POC patch below saves 76 bytes on > a i386. (And that is only on-disk.) > > Is there a reason not to use CTASSERT (and some kind of > member_sizeof())? I couldn&#

Compile time assertions

2011-11-14 Thread Steffen Daode Nurpmeso
Hi, my dhclient.c patch was very wrong. And it (falsely) removed a runtime check of some struct member size. But this very hunk (while wrong) led me to a question. Since saving even some bytes in shell scripts counts so much, i wonder why compile-time assertions are not used at all (AFAIK). I.e