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

[MiNT] MiNTlibs for PureC



Hallo Guido,

GF>structure, a smart compiler should actually know from the declaration

But the constants are stored seperately, like strings. The
standard-C-compiler isn't that smart. Ok: GNU is (hopefully) ;-)

GF>which types the constants have. You ANSI C experts out there: What does
GF>the standard say?

Constants are by default 'int' :-)

But I'm still not an expert.

GF>I mean, if they were not "long" but char, the compiler would also have
to
GF>know that a "1" is not an integer or long but a char.

That's the other way 'round: From 16 to 8 bit, he can easily cast, no
information is lost, but it is if it's stored as probably shortened
'long'. What shall 0xffff be: -1 or 0xffff?

bye, Helmut