Re: A Problem With GD
- From: "Lukas Mai" <rwxr-xr-x@xxxxxx>
- Date: Sun, 19 Mar 2006 13:21:22 +0100
robic0 schrob:
On Wed, 15 Mar 2006 10:37:30 +0100,
"Tassilo v. Parseval" <tassilo.von.parseval@xxxxxxxxxxxxxx> wrote:
Also sprach robic0:
For instance, long, short and byte are macro's.
As to all I know, this is utter nonsense. Do you have any documents
backing up that 'short' and 'long' are macros?
Really? What does a compiler know? It knows the smallest and the largest.
The smallest is always a "char", the largest is always an "int".
Wrong. The smallest addressable unit is always a char, but long int or
long long int are often larger than int.
Int is the largest bit representation of a native compiler that it knows
about of the largest data register that it is designed to work with.
"Native compilers" are irrelevant. I'm talking about C. A C
implementation isn't required to use something called "registers".
Albeit the data register must be "at least" as big.
So what is a "short", is it half the "int"? How many bits is that?
Is a "short" half of the "int"? Nope, its not!
Irrelevant.
In your mind, a "short" is 16 bits.
No.
Thats 1/4 of an "int" in a 64 bit
compiler.
Wrong. Many 64-bit compilers have 32-bit ints (for backwards
compatibility with broken programs). This also disproves your claim that
"int" corresponds to the largest data register of the underlying
machine.
Thats why "short" is a macro as well as byte (which has been
a macro almost since it was named).
"short" can't be a macro, and "byte" isn't standard C(++). Oh, and typedefs
aren't macros ("short" can't be a typedef either).
Macros controlled by either differently
named "extra-short-short" or whatever.
I don't understand that part.
Start a short C++ program in VC6 and use the type "short" and "byte"
and "long" then trace the definition. It leads to a MACRO!
Impossible. VC6 isn't a C++ compiler; the language it translates shares
a common subset with C++, but that's all. Besides, how do you "trace the
definition" for things like
long x;
long int y;
int long z;
long double f;
double long g;
? They're all valid C++. I'd like to see a macro implementation of
"long" that supports this.
There is only char and int, the min and max. All others are NOT TYPED
anymore for years!!! They translate into these two.
Definitely wrong. void, signed char, unsigned char, char, short,
unsigned short, int, unsigned int, long, unsigned long, float, double
and long double are all distinct types.
HTH, Lukas
.
- Follow-Ups:
- Re: A Problem With GD
- From: robic0
- Re: A Problem With GD
- References:
- Re: A Problem With GD
- From: robic0
- Re: A Problem With GD
- From: Mark Manning
- Re: A Problem With GD
- From: robic0
- Re: A Problem With GD
- From: Tassilo v. Parseval
- Re: A Problem With GD
- From: robic0
- Re: A Problem With GD
- Prev by Date: Re: Is it a gtk2 problem or Threads problem
- Next by Date: Re: ebayapi
- Previous by thread: Re: A Problem With GD
- Next by thread: Re: A Problem With GD
- Index(es):
Relevant Pages
|