arith.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
  3. * See the copyright notice in the ACK home directory, in the file "Copyright".
  4. */
  5. /* $Id$ */
  6. /* COMPILER ARITHMETIC */
  7. /* Normally the compiler does its internal arithmetics in longs
  8. native to the source machine, which is always good for local
  9. compilations, and generally OK too for cross compilations
  10. downwards and sidewards. For upwards cross compilation and
  11. to save storage on small machines, SPECIAL_ARITHMETICS will
  12. be handy.
  13. */
  14. #include "spec_arith.h"
  15. #ifndef SPECIAL_ARITHMETICS
  16. #include <em_arith.h> /* obtain definition of "arith" */
  17. #else /* SPECIAL_ARITHMETICS */
  18. /* All preprocessor arithmetic should be done in longs.
  19. */
  20. #define arith long /* dummy */
  21. #endif /* SPECIAL_ARITHMETICS */
  22. #define arith_size (sizeof(arith))
  23. #define arith_sign ((arith) 1 << (arith_size * 8 - 1))
  24. #define max_arith (~arith_sign)
  25. struct expr;
  26. struct type;
  27. void erroneous2int(struct expr **expp);
  28. int int2int(struct expr **expp, struct type *tp);
  29. void int2float(struct expr **expp, struct type *tp);
  30. void float2float(struct expr**expp, struct type *tp);
  31. void field2arith(struct expr **expp);
  32. void ch3pointer(struct expr **expp, int oper, struct type *tp);