emacs-devel
[Top][All Lists]
Advanced

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

Re: list-colors-display shows only one color


From: Andreas Schwab
Subject: Re: list-colors-display shows only one color
Date: Wed, 13 Feb 2002 14:31:34 +0100
User-agent: Gnus/5.090005 (Oort Gnus v0.05) Emacs/21.2.50 (ia64-suse-linux)

Juanma Barranquero <address@hidden> writes:

|> Anway, 1 << 32 is an error because it's obviously going to overflow cap.

The C standard makes this undefined:

    6.5.7 Bitwise shift operators

    [#3] The integer promotions are performed on each of the operands. The
    type of the result is that of the promoted left operand. If the value
    of the right operand is negative or is greater than or equal to the
    width of the promoted left operand, the behavior is undefined.

Even (1 << 31) is undefined, since that is not representable in a 32-bit
signed int.

Andreas.

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE GmbH, Deutschherrnstr. 15-19, D-90429 N├╝rnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



reply via email to

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