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

Predefined Pragma Variables



I want to introduce some predefined pragma variables for OOC to
provide information about the compiler version used, its capabilities,
and the target system.  Here is my preliminary list of variables,
together with values they would take for oo2c.

COMPILER_VERSION
  Version string.  oo2c: "1.3.2"
COMPILER_MAJOR
  Major version number of the compiler.  oo2c: 1
COMPILER_MINOR
  Minor version number of the compiler.  oo2c: 3
  
TARGET_OS
  String describing the target operating system.  oo2c: "Unix"
TARGET_ARCH
  String describing the target architecture, that is, the CPU family.
  oo2c: "ANSI-C" (oo2c's idea of the target architecture is a bit
  unusual).  Other examples: "ix86", "PPC", "Alpha"
TARGET_ARCH_MINOR
  String describing the subclass of the CPU family.  For oo2c this
  would be the empty string; other examples: "i486", "i586", etc.
TARGET_INTEGER
  Number of bits in largest integer type supported for the target.
  For oo2c_32: 32; if it's >=64, then the types HUGEINT and SET64 are
  supported.
TARGET_ADDRESS
  Number of bits in address representation of the target.
  For oo2c_32: 32
TARGET_BYTE_ORDER
  For a little endian target this is "3210", for a big endian target
  "0123".  For oo2c it is "unknown".

Any comments (additional variables, different names or definitions)?

-- mva