unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Dirk Herrmann <dirk@sallust.ida.ing.tu-bs.de>
Cc: Guile Devel <guile-devel@gnu.org>
Subject: Re: SCM_POSFIXABLE(-1) fails with MSVC++ 6.0
Date: Sat, 24 Aug 2002 09:42:51 +0200 (CEST)	[thread overview]
Message-ID: <Pine.GSO.4.05.10208240941200.4796-100000@sallust.ida.ing.tu-bs.de> (raw)
In-Reply-To: <20020823104054.GA27923@sim.no>

On Fri, 23 Aug 2002, Lars J. Aas wrote:

> Lars J. Aas <larsa@sim.no> wrote:
> : Changing the alternative definition of SCM_LONG_BITS to cast the value
> : to long like this works...
> : 
> : # define SCM_LONG_BIT ((long)(SCM_CHAR_BIT * sizeof (long) / sizeof (char)))
> 
> Come to think of it, the cast is better placed on the inside so it's more
> evident what is being done (stopping the unsigned-ness of the sizeof()-
> operations to propagate incorrectly out through the macro invokation) so
> it's not removed later by someone not knowing about this compiler bug.
> 
> # define SCM_LONG_BIT (SCM_CHAR_BIT * ((long) (sizeof (long) / sizeof (char))))
> 
> or s/long/int/ on the cast?
> 
> BTW, is anyone reading these mails? ;)
> 
>   Lars J

I am not sure I understand the problem here:  is the failure of testing 
-1 <= sizeof(long) a compiler bug, or is the strange behaviour defined
in the C language?

Best regards,
Dirk Herrmann



_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


  reply	other threads:[~2002-08-24  7:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-22 13:30 SCM_POSFIXABLE(-1) fails with MSVC++ 6.0 Lars J. Aas
2002-08-22 13:47 ` Lars J. Aas
2002-08-23 10:40   ` Lars J. Aas
2002-08-24  7:42     ` Dirk Herrmann [this message]
2002-08-24 15:57       ` Lynn Winebarger
2002-08-25 13:27       ` Lars J. Aas
2002-08-25 16:01         ` Lynn Winebarger

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=Pine.GSO.4.05.10208240941200.4796-100000@sallust.ida.ing.tu-bs.de \
    --to=dirk@sallust.ida.ing.tu-bs.de \
    --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).