[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Devel] Off topic? Signed versus unsigned for hexadecimal constants.
From: |
Tom Kacvinsky |
Subject: |
[Devel] Off topic? Signed versus unsigned for hexadecimal constants. |
Date: |
Mon, 26 Mar 2001 21:22:07 -0500 (EST) |
Based on the email earlier today about hexadecimal constants, I have found the
following
(no qualifiers such as U or UL or L on the constant):
Solaris treats hexadecimal constants as
unsigned (that's with the Forte 6.0 C compiler in ANSI mode [-Xc])
signed (thats with gcc -ansi)
HP-UX treats hexadecimal constants as signed (c89 and ?)
Digital UNIX treats hexadecimal constants as signed (both cc -std1 and gcc
-ansi)
I don't have my ANSI C99 spec. in front of me (its at work, I'm at home), but
based on
the above, I'd have to say its the ANSI specification that hexadecimal
constants should
be treated as signed unless the U qualifier is given.
Anyone else agree? Disagree? If I am right, I will try to contact Sun and
file a report
that their ANSI "compliant" C compiler is not ANSI compliant.
Tom
- [Devel] Off topic? Signed versus unsigned for hexadecimal constants.,
Tom Kacvinsky <=