ybungalobill ybungalobill - 10 months ago 72
C Question

Exotic architectures the standards committees care about

I know that the C and C++ standards leave many aspects of the language implementation-defined just because if there is an architecture with other characteristics, it would be very difficult or impossible to write a standard conforming compiler for it.

I know that 40 years ago any computer had its own unique specification. However, I don't know of any architectures used today where:

  • CHAR_BIT != 8

  • signed
    is not two's complement (I heard Java had problems with this one).

  • Floating point is not IEEE 754 compliant (Edit: I meant "not in IEEE 754 binary encoding").

The reason I'm asking is that I often explain to people that it's good that C++ doesn't mandate any other low-level aspects like fixed sized types. It's good because unlike 'other languages' it makes your code portable when used correctly. But I feel bad that I cannot point to any specific architecture myself.

So the question is: what architectures exhibit the above properties?

s are optional.

Answer Source

Take a look at this one

Unisys ClearPath Dorado Servers

offering backward compatibility for people who have not yet migrated all their Univac software.

Key points:

  • 36-bit words
  • CHAR_BIT == 9
  • one's complement
  • 72-bit non-IEEE floating point
  • separate address space for code and data
  • sizeof(char*) != sizeof(int*)[maybe not]
  • word-addressed

Don't know if they offer a C++ compiler though, but they could.