bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: generic crypto - remarks


From: Ben Pfaff
Subject: Re: generic crypto - remarks
Date: Fri, 21 Oct 2005 10:44:52 -0700
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

Jim Meyering <address@hidden> writes:

> Putting a compile-time assertion like the following,
> right after the struct definition, adds some clout :-)
>
>   verify (offsetof (struct S, member_m) % 4 == 0);
>
> Hmm... that assumes 8-bit bytes.

You could multiply by CHAR_BIT and check for a multiple of 32.
-- 
Ben Pfaff 
email: address@hidden
web: http://benpfaff.org





reply via email to

[Prev in Thread] Current Thread [Next in Thread]