unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: guile-devel@gnu.org
Subject: Re: Static Asserts
Date: Sun, 20 Jun 2010 15:58:52 +0200	[thread overview]
Message-ID: <87fx0h3iw3.fsf@gnu.org> (raw)
In-Reply-To: AANLkTikYRzwB1IBnCJMTzd3BMSud9GUBAGKCIFF7fbdo@mail.gmail.com

Hi,

Noah Lavine <noah.b.lavine@gmail.com> writes:

> I discovered that my previous build failure was not because of a
> Makefile issue but because my modifications had changed the size of
> struct scm_objcode, which broke other parts of the program. I found
> several files where structs are cast from bytes using #define'd
> values, which are most likely the problem.
>
> It wouldn't be too hard to change these headers to work with my code,
> but that wouldn't be very future-proof. I'd like to add some mechanism
> so that if sizeof(struct scm_objcode) ever changes again, it will be
> obvious that there is a problem. It seems to me that the best way to
> do this is some sort of assertion. I'd like to pick an assert
> mechanism that is acceptable to the Guile developers. Therefore, my
> question is this: what sort of compile-time assert mechanism would you
> like to see?

We already use Gnulib’s ‘verify’ macro in some places (see
‘lib/verify.h’).  If you stumble upon a missing assertion, please do
post a patch.  :-)

Thanks,
Ludo’.




      reply	other threads:[~2010-06-20 13:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-19 19:43 Static Asserts Noah Lavine
2010-06-20 13:58 ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fx0h3iw3.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).