This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Ada policy


Robert Dewar wrote:
Hmm .. I admit I am not an expert in C99 but I thought that stdint.h only
required a very limited number of integer types, basically the powers of 2.
So for example, there is no equivalent of

type R is range -2**23 .. 2**23-1;

which you expect to map into 24 bits on a 24 bit machine, and 36 bits on
a 36 bit machine.

Ah! No, that is *not* something that can be done in Standard C; I was unaware that Ada supported such a capability. See why I don't comment on Ada's capabilities? ;)


I understood that you were discussing portability (based on your focus on int), which is often a matter of making certain that type "X" has a compatible range across multiple platforms. Thus the stdint.h definitions.

That is, of course, assuming you have a Standard C compiler across your target platforms. :)

Well I must say I was a bit surprised at the claim that it was arguable
whether large applications could be practically written sticking strictly
to ISO C (almost as surprising as Zack's claim that this was clearly
impractical for Ada :-) I also found the idea that the only way to
achieve portability is through use of conditional compilation to be
surprising (I doubt this is true).

I've written a lot of portable C and C++; due to the lack of standards-compliant compilers or the use of platform-dependent facilities (e.g., GUIs), such code often contains conditional statements.


--
Scott Robert Ladd
Coyote Gulch Productions (http://www.coyotegulch.com)
Software Invention for High-Performance Computing


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]