removed entity_visited flag - use type_visited instead
[libfirm] / ir / adt / host.h
1 /* Declarations describing the host machine and C compiler.
2    Copyright (C) 1995, 1996 Markus Armbruster
3    All rights reserved.*/
4
5 /* $Id$ */
6
7 #ifndef _HOST_H
8 #define _HOST_H
9
10 #include <stddef.h>
11
12
13 /* A size handled efficiently by malloc(), at least 1K.  */
14 #define PREF_MALLOC_SIZE 2048
15
16
17 /* GNU C's __attribute__ */
18
19 /* According to the documentation, the attributes we are interested in
20    work with 2.5, but we encountered trouble before 2.7.  */
21 #if defined (__GNUC__) && __GNUC__ >= 2 && __GNUC_MINOR__ >= 7
22 # define HAVE_ATTRIBUTE 1
23 # define ATTRIBUTE(attrs) __attribute__ (attrs)
24 #else
25 # define ATTRIBUTE(attrs)
26 #endif
27
28
29 /* Alignment */
30
31 /* A type that has most constrained alignment.  */
32 typedef union {
33   long double d;
34   void *p;
35   long l;
36 } aligned_type ATTRIBUTE ((aligned));
37
38 /* Inquiring about the alignment.  */
39 #ifdef __GNUC__
40 # define ALIGNOF(type) __alignof__ (type)
41 #else
42 # define ALIGNOF(type) offsetof (struct { char c; type d; }, d)
43 #endif
44
45 /* Maximal alignment required for any type.  */
46 #define MAX_ALIGN ALIGNOF (aligned_type)
47
48 #endif