chk_expr.h 822 B

12345678910111213141516171819202122232425
  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. * Author: Ceriel J.H. Jacobs
  6. */
  7. /* E X P R E S S I O N C H E C K I N G */
  8. /* $Id$ */
  9. extern int (*ExprChkTable[])(); /* table of expression checking
  10. functions, indexed by node class
  11. */
  12. extern int (*DesigChkTable[])(); /* table of designator checking
  13. functions, indexed by node class
  14. */
  15. #define ChkExpression(expp) ((*ExprChkTable[(*expp)->nd_class])(expp,D_USED))
  16. #define ChkDesig(expp, flags) ((*DesigChkTable[(*expp)->nd_class])(expp,flags))
  17. /* handle reference counts for sets */
  18. #define inc_refcount(s) (*((int *)(s) - 1) += 1)
  19. #define dec_refcount(s) (*((int *)(s) - 1) -= 1)
  20. #define refcount(s) (*((int *)(s) - 1))