This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: `quad' printf format specifier ?
- To: Alex Buell <alex dot buell at tahallah dot demon dot co dot uk>
- Subject: Re: `quad' printf format specifier ?
- From: Jeffrey A Law <law at hurl dot cygnus dot com>
- Date: Mon, 08 Feb 1999 14:56:47 -0700
- cc: egcs at egcs dot cygnus dot com
- Reply-To: law at cygnus dot com
In message <Pine.LNX.4.05.9902081606350.164-100000@lo-pc3035a.hitc.com>you wr
ite:
> Assuming that >= means greater *or* equal to, are you saying that given
> 'long long' is 64 bits then 'long', 'int', 'short' and 'char' can also be
> 64 bits in certain circumstances?
I believe they can. I'm not aware of any such target, but I do not think it
is disallowed by the standard.
I believe the wording typically sounds like a "char is large enough to hold
a character on the target machine" or something like that.
I'm not a language lawyer though.
> If that's correct, the expression 'Oh bugger!' is something that comes to
> mind. What's the best way to ensure that you get datatypes of a given
> bit-length in C/C++?
I'm not sure if there is -- ISO may (or may not) have defined types for
specific sizes.
You can play these kinds of games:
#if UCHAR_MAX == 255
typedef unsigned char uint8;
typedef signed char int8;
#else
#error "Char is not an 8-bit type"
#endif
> OK, this is getting off-topic for the egcs mailing list, time to take this
> to comp.lang.c or .c++.
Yup.
jeff