]> git.sur5r.net Git - cc65/blob - src/cc65/datatype.h
More changes to support address size qualifiers.
[cc65] / src / cc65 / datatype.h
1 /*****************************************************************************/
2 /*                                                                           */
3 /*                                datatype.h                                 */
4 /*                                                                           */
5 /*               Type string handling for the cc65 C compiler                */
6 /*                                                                           */
7 /*                                                                           */
8 /*                                                                           */
9 /* (C) 1998-2008 Ullrich von Bassewitz                                       */
10 /*               Roemerstrasse 52                                            */
11 /*               D-70794 Filderstadt                                         */
12 /* EMail:        uz@cc65.org                                                 */
13 /*                                                                           */
14 /*                                                                           */
15 /* This software is provided 'as-is', without any expressed or implied       */
16 /* warranty.  In no event will the authors be held liable for any damages    */
17 /* arising from the use of this software.                                    */
18 /*                                                                           */
19 /* Permission is granted to anyone to use this software for any purpose,     */
20 /* including commercial applications, and to alter it and redistribute it    */
21 /* freely, subject to the following restrictions:                            */
22 /*                                                                           */
23 /* 1. The origin of this software must not be misrepresented; you must not   */
24 /*    claim that you wrote the original software. If you use this software   */
25 /*    in a product, an acknowledgment in the product documentation would be  */
26 /*    appreciated but is not required.                                       */
27 /* 2. Altered source versions must be plainly marked as such, and must not   */
28 /*    be misrepresented as being the original software.                      */
29 /* 3. This notice may not be removed or altered from any source              */
30 /*    distribution.                                                          */
31 /*                                                                           */
32 /*****************************************************************************/
33
34
35
36 #ifndef DATATYPE_H
37 #define DATATYPE_H
38
39
40
41 #include <stdio.h>
42
43 /* common */
44 #include "attrib.h"
45 #include "inline.h"
46 #include "mmodel.h"
47
48 /* cc65 */
49 #include "funcdesc.h"
50
51
52
53 /*****************************************************************************/
54 /*                                   Data                                    */
55 /*****************************************************************************/
56
57
58
59
60 /* Basic data types */
61 enum {
62     T_END           = 0x000000,
63
64     /* Basic types */
65     T_TYPE_NONE     = 0x000000,
66     T_TYPE_CHAR     = 0x000001,
67     T_TYPE_SHORT    = 0x000002,
68     T_TYPE_INT      = 0x000003,
69     T_TYPE_LONG     = 0x000004,
70     T_TYPE_LONGLONG = 0x000005,
71     T_TYPE_ENUM     = 0x000006,
72     T_TYPE_FLOAT    = 0x000007,
73     T_TYPE_DOUBLE   = 0x000008,
74     T_TYPE_VOID     = 0x000009,
75     T_TYPE_STRUCT   = 0x00000A,
76     T_TYPE_UNION    = 0x00000B,
77     T_TYPE_ARRAY    = 0x00000C,
78     T_TYPE_PTR      = 0x00000D,
79     T_TYPE_FUNC     = 0x00000E,
80     T_MASK_TYPE     = 0x00000F,
81
82     /* Type classes */
83     T_CLASS_NONE    = 0x000000,
84     T_CLASS_INT     = 0x000010,
85     T_CLASS_FLOAT   = 0x000020,
86     T_CLASS_PTR     = 0x000030,
87     T_CLASS_STRUCT  = 0x000040,
88     T_CLASS_FUNC    = 0x000050,
89     T_MASK_CLASS    = 0x000070,
90
91     /* Type signedness */
92     T_SIGN_NONE     = 0x000000,
93     T_SIGN_UNSIGNED = 0x000080,
94     T_SIGN_SIGNED   = 0x000100,
95     T_MASK_SIGN     = 0x000180,
96
97     /* Type size modifiers */
98     T_SIZE_NONE     = 0x000000,
99     T_SIZE_SHORT    = 0x000200,
100     T_SIZE_LONG     = 0x000400,
101     T_SIZE_LONGLONG = 0x000600,
102     T_MASK_SIZE     = 0x000600,
103
104     /* Type qualifiers */
105     T_QUAL_NONE     = 0x000000,
106     T_QUAL_CONST    = 0x000800,
107     T_QUAL_VOLATILE = 0x001000,
108     T_QUAL_RESTRICT = 0x002000,
109     T_QUAL_NEAR     = 0x004000,
110     T_QUAL_FAR      = 0x008000,
111     T_QUAL_ADDRSIZE = T_QUAL_NEAR | T_QUAL_FAR,
112     T_QUAL_FASTCALL = 0x010000,
113     T_MASK_QUAL     = 0x01F800,
114
115     /* Types */
116     T_CHAR      = T_TYPE_CHAR     | T_CLASS_INT    | T_SIGN_UNSIGNED | T_SIZE_NONE,
117     T_SCHAR     = T_TYPE_CHAR     | T_CLASS_INT    | T_SIGN_SIGNED   | T_SIZE_NONE,
118     T_UCHAR     = T_TYPE_CHAR     | T_CLASS_INT    | T_SIGN_UNSIGNED | T_SIZE_NONE,
119     T_SHORT     = T_TYPE_SHORT    | T_CLASS_INT    | T_SIGN_SIGNED   | T_SIZE_SHORT,
120     T_USHORT    = T_TYPE_SHORT    | T_CLASS_INT    | T_SIGN_UNSIGNED | T_SIZE_SHORT,
121     T_INT       = T_TYPE_INT      | T_CLASS_INT    | T_SIGN_SIGNED   | T_SIZE_NONE,
122     T_UINT      = T_TYPE_INT      | T_CLASS_INT    | T_SIGN_UNSIGNED | T_SIZE_NONE,
123     T_LONG      = T_TYPE_LONG     | T_CLASS_INT    | T_SIGN_SIGNED   | T_SIZE_LONG,
124     T_ULONG     = T_TYPE_LONG     | T_CLASS_INT    | T_SIGN_UNSIGNED | T_SIZE_LONG,
125     T_LONGLONG  = T_TYPE_LONGLONG | T_CLASS_INT    | T_SIGN_SIGNED   | T_SIZE_LONGLONG,
126     T_ULONGLONG = T_TYPE_LONGLONG | T_CLASS_INT    | T_SIGN_UNSIGNED | T_SIZE_LONGLONG,
127     T_ENUM      = T_TYPE_ENUM     | T_CLASS_INT    | T_SIGN_SIGNED   | T_SIZE_NONE,
128     T_FLOAT     = T_TYPE_FLOAT    | T_CLASS_FLOAT  | T_SIGN_NONE     | T_SIZE_NONE,
129     T_DOUBLE    = T_TYPE_DOUBLE   | T_CLASS_FLOAT  | T_SIGN_NONE     | T_SIZE_NONE,
130     T_VOID      = T_TYPE_VOID     | T_CLASS_NONE   | T_SIGN_NONE     | T_SIZE_NONE,
131     T_STRUCT    = T_TYPE_STRUCT   | T_CLASS_STRUCT | T_SIGN_NONE     | T_SIZE_NONE,
132     T_UNION     = T_TYPE_UNION    | T_CLASS_STRUCT | T_SIGN_NONE     | T_SIZE_NONE,
133     T_ARRAY     = T_TYPE_ARRAY    | T_CLASS_PTR    | T_SIGN_NONE     | T_SIZE_NONE,
134     T_PTR       = T_TYPE_PTR      | T_CLASS_PTR    | T_SIGN_NONE     | T_SIZE_NONE,
135     T_FUNC      = T_TYPE_FUNC     | T_CLASS_FUNC   | T_SIGN_NONE     | T_SIZE_NONE,
136
137     /* Aliases */
138     T_SIZE_T    = T_UINT,
139 };
140
141
142
143 /* Type code entry */
144 typedef unsigned long TypeCode;
145
146 /* Type entry */
147 typedef struct Type Type;
148 struct Type {
149     TypeCode            C;      /* Code for this entry */
150     union {
151         void*           P;      /* Arbitrary attribute pointer */
152         long            L;      /* Numeric attribute value */
153         unsigned long   U;      /* Dito, unsigned */
154     } A;                        /* Type attribute if necessary */
155 };
156
157 /* A macro that expands to a full initializer for struct Type */
158 #define TYPE(T)         { (T), { 0 } }
159
160 /* Maximum length of a type string */
161 #define MAXTYPELEN      30
162
163 /* Special encodings for element counts of an array */
164 #define UNSPECIFIED     -1L     /* Element count was not specified */
165 #define FLEXIBLE        0L      /* Flexible array struct member */
166
167 /* Sizes. Floating point sizes come from fp.h */
168 #define SIZEOF_CHAR     1
169 #define SIZEOF_SHORT    2
170 #define SIZEOF_INT      2
171 #define SIZEOF_LONG     4
172 #define SIZEOF_LONGLONG 8
173 #define SIZEOF_FLOAT    (FP_F_Size())
174 #define SIZEOF_DOUBLE   (FP_D_Size())
175 #define SIZEOF_PTR      2
176
177 /* Predefined type strings */
178 extern Type type_schar[];
179 extern Type type_uchar[];
180 extern Type type_int[];
181 extern Type type_uint[];
182 extern Type type_long[];
183 extern Type type_ulong[];
184 extern Type type_void[];
185 extern Type type_size_t[];
186 extern Type type_float[];
187 extern Type type_double[];
188
189 /* Forward for the SymEntry struct */
190 struct SymEntry;
191
192
193
194 /*****************************************************************************/
195 /*                                   Code                                    */
196 /*****************************************************************************/
197
198
199
200 unsigned TypeLen (const Type* T);
201 /* Return the length of the type string */
202
203 Type* TypeCopy (Type* Dest, const Type* Src);
204 /* Copy a type string */
205
206 Type* TypeDup (const Type* T);
207 /* Create a copy of the given type on the heap */
208
209 Type* TypeAlloc (unsigned Len);
210 /* Allocate memory for a type string of length Len. Len *must* include the
211  * trailing T_END.
212  */
213
214 void TypeFree (Type* T);
215 /* Free a type string */
216
217 int SignExtendChar (int C);
218 /* Do correct sign extension of a character */
219
220 TypeCode GetDefaultChar (void);
221 /* Return the default char type (signed/unsigned) depending on the settings */
222
223 Type* GetCharArrayType (unsigned Len);
224 /* Return the type for a char array of the given length */
225
226 Type* GetImplicitFuncType (void);
227 /* Return a type string for an inplicitly declared function */
228
229 Type* PointerTo (const Type* T);
230 /* Return a type string that is "pointer to T". The type string is allocated
231  * on the heap and may be freed after use.
232  */
233
234 void PrintType (FILE* F, const Type* T);
235 /* Output translation of type array. */
236
237 void PrintRawType (FILE* F, const Type* T);
238 /* Print a type string in raw format (for debugging) */
239
240 void PrintFuncSig (FILE* F, const char* Name, Type* T);
241 /* Print a function signature. */
242
243 int TypeHasAttr (const Type* T);
244 /* Return true if the given type has attribute data */
245
246 #if defined(HAVE_INLINE)
247 INLINE void CopyTypeAttr (const Type* Src, Type* Dest)
248 /* Copy attribute data from Src to Dest */
249 {
250     Dest->A = Src->A;
251 }
252 #else
253 #  define CopyTypeAttr(Src, Dest)       ((Dest)->A = (Src)->A)
254 #endif
255
256 #if defined(HAVE_INLINE)
257 INLINE TypeCode UnqualifiedType (TypeCode T)
258 /* Return the unqalified type code */
259 {
260     return (T & ~T_MASK_QUAL);
261 }
262 #else
263 #  define UnqualifiedType(T)    ((T) & ~T_MASK_QUAL)
264 #endif
265
266 unsigned SizeOf (const Type* T);
267 /* Compute size of object represented by type array. */
268
269 unsigned PSizeOf (const Type* T);
270 /* Compute size of pointer object. */
271
272 unsigned CheckedSizeOf (const Type* T);
273 /* Return the size of a data type. If the size is zero, emit an error and
274  * return some valid size instead (so the rest of the compiler doesn't have
275  * to work with invalid sizes).
276  */
277 unsigned CheckedPSizeOf (const Type* T);
278 /* Return the size of a data type that is pointed to by a pointer. If the
279  * size is zero, emit an error and return some valid size instead (so the
280  * rest of the compiler doesn't have to work with invalid sizes).
281  */
282
283 unsigned TypeOf (const Type* T);
284 /* Get the code generator base type of the object */
285
286 Type* Indirect (Type* T);
287 /* Do one indirection for the given type, that is, return the type where the
288  * given type points to.
289  */
290
291 Type* ArrayToPtr (const Type* T);
292 /* Convert an array to a pointer to it's first element */
293
294 #if defined(HAVE_INLINE)
295 INLINE TypeCode GetType (const Type* T)
296 /* Get the raw type */
297 {
298     return (T->C & T_MASK_TYPE);
299 }
300 #else
301 #  define GetType(T)    ((T)->C & T_MASK_TYPE)
302 #endif
303
304 #if defined(HAVE_INLINE)
305 INLINE int IsTypeChar (const Type* T)
306 /* Return true if this is a character type */
307 {
308     return (GetType (T) == T_TYPE_CHAR);
309 }
310 #else
311 #  define IsTypeChar(T)         (GetType (T) == T_TYPE_CHAR)
312 #endif
313
314 #if defined(HAVE_INLINE)
315 INLINE int IsTypeInt (const Type* T)
316 /* Return true if this is an int type (signed or unsigned) */
317 {
318     return (GetType (T) == T_TYPE_INT);
319 }
320 #else
321 #  define IsTypeInt(T)          (GetType (T) == T_TYPE_INT)
322 #endif
323
324 #if defined(HAVE_INLINE)
325 INLINE int IsTypeLong (const Type* T)
326 /* Return true if this is a long type (signed or unsigned) */
327 {
328     return (GetType (T) == T_TYPE_LONG);
329 }
330 #else
331 #  define IsTypeLong(T)         (GetType (T) == T_TYPE_LONG)
332 #endif
333
334 #if defined(HAVE_INLINE)
335 INLINE int IsTypeFloat (const Type* T)
336 /* Return true if this is a float type */
337 {
338     return (GetType (T) == T_TYPE_FLOAT);
339 }
340 #else
341 #  define IsTypeFloat(T)        (GetType (T) == T_TYPE_FLOAT)
342 #endif
343
344 #if defined(HAVE_INLINE)
345 INLINE int IsTypeDouble (const Type* T)
346 /* Return true if this is a double type */
347 {
348     return (GetType (T) == T_TYPE_DOUBLE);
349 }
350 #else
351 #  define IsTypeDouble(T)       (GetType (T) == T_TYPE_DOUBLE)
352 #endif
353
354 #if defined(HAVE_INLINE)
355 INLINE int IsTypePtr (const Type* T)
356 /* Return true if this is a pointer type */
357 {
358     return (GetType (T) == T_TYPE_PTR);
359 }
360 #else
361 #  define IsTypePtr(T)          (GetType (T) == T_TYPE_PTR)
362 #endif
363
364 #if defined(HAVE_INLINE)
365 INLINE int IsTypeStruct (const Type* T)
366 /* Return true if this is a struct type */
367 {
368     return (GetType (T) == T_TYPE_STRUCT);
369 }
370 #else
371 #  define IsTypeStruct(T)       (GetType (T) == T_TYPE_STRUCT)
372 #endif
373
374 #if defined(HAVE_INLINE)
375 INLINE int IsTypeUnion (const Type* T)
376 /* Return true if this is a union type */
377 {
378     return (GetType (T) == T_TYPE_UNION);
379 }
380 #else
381 #  define IsTypeUnion(T)       (GetType (T) == T_TYPE_UNION)
382 #endif
383
384 #if defined(HAVE_INLINE)
385 INLINE int IsTypeArray (const Type* T)
386 /* Return true if this is an array type */
387 {
388     return (GetType (T) == T_TYPE_ARRAY);
389 }
390 #else
391 #  define IsTypeArray(T)        (GetType (T) == T_TYPE_ARRAY)
392 #endif
393
394 #if defined(HAVE_INLINE)
395 INLINE int IsTypeVoid (const Type* T)
396 /* Return true if this is a void type */
397 {
398     return (GetType (T) == T_TYPE_VOID);
399 }
400 #else
401 #  define IsTypeVoid(T)         (GetType (T) == T_TYPE_VOID)
402 #endif
403
404 #if defined(HAVE_INLINE)
405 INLINE int IsTypeFunc (const Type* T)
406 /* Return true if this is a function class */
407 {
408     return (GetType (T) == T_TYPE_FUNC);
409 }
410 #else
411 #  define IsTypeFunc(T)         (GetType (T) == T_TYPE_FUNC)
412 #endif
413
414 #if defined(HAVE_INLINE)
415 INLINE int IsTypeFuncPtr (const Type* T)
416 /* Return true if this is a function pointer */
417 {
418     return (IsTypePtr (T) && IsTypeFunc (T+1));
419 }
420 #else
421 #  define IsTypeFuncPtr(T)      (IsTypePtr (T) && IsTypeFunc (T+1))
422 #endif
423
424 #if defined(HAVE_INLINE)
425 INLINE TypeCode GetClass (const Type* T)
426 /* Get the class of a type string */
427 {
428     return (T->C & T_MASK_CLASS);
429 }
430 #else
431 #  define GetClass(T)    ((T)->C & T_MASK_CLASS)
432 #endif
433
434 #if defined(HAVE_INLINE)
435 INLINE int IsClassInt (const Type* T)
436 /* Return true if this is an integer type */
437 {
438     return (GetClass (T) == T_CLASS_INT);
439 }
440 #else
441 #  define IsClassInt(T)         (GetClass (T) == T_CLASS_INT)
442 #endif
443
444 #if defined(HAVE_INLINE)
445 INLINE int IsClassFloat (const Type* T)
446 /* Return true if this is a float type */
447 {
448     return (GetClass (T) == T_CLASS_FLOAT);
449 }
450 #else
451 #  define IsClassFloat(T)       (GetClass (T) == T_CLASS_FLOAT)
452 #endif
453
454 #if defined(HAVE_INLINE)
455 INLINE int IsClassPtr (const Type* T)
456 /* Return true if this is a pointer type */
457 {
458     return (GetClass (T) == T_CLASS_PTR);
459 }
460 #else
461 #  define IsClassPtr(T)         (GetClass (T) == T_CLASS_PTR)
462 #endif
463
464 #if defined(HAVE_INLINE)
465 INLINE int IsClassStruct (const Type* T)
466 /* Return true if this is a struct type */
467 {
468     return (GetClass (T) == T_CLASS_STRUCT);
469 }
470 #else
471 #  define IsClassStruct(T)      (GetClass (T) == T_CLASS_STRUCT)
472 #endif
473
474 #if defined(HAVE_INLINE)
475 INLINE int IsClassFunc (const Type* T)
476 /* Return true if this is a function type */
477 {
478     return (GetClass (T) == T_CLASS_FUNC);
479 }
480 #else
481 #  define IsClassFunc(T)        (GetClass (T) == T_CLASS_FUNC)
482 #endif
483
484 #if defined(HAVE_INLINE)
485 INLINE TypeCode GetSignedness (const Type* T)
486 /* Get the sign of a type */
487 {
488     return (T->C & T_MASK_SIGN);
489 }
490 #else
491 #  define GetSignedness(T)      ((T)->C & T_MASK_SIGN)
492 #endif
493
494 #if defined(HAVE_INLINE)
495 INLINE int IsSignUnsigned (const Type* T)
496 /* Return true if this is an unsigned type */
497 {
498     return (GetSignedness (T) == T_SIGN_UNSIGNED);
499 }
500 #else
501 #  define IsSignUnsigned(T)     (GetSignedness (T) == T_SIGN_UNSIGNED)
502 #endif
503
504 #if defined(HAVE_INLINE)
505 INLINE int IsSignSigned (const Type* T)
506 /* Return true if this is a signed type */
507 {
508     return (GetSignedness (T) == T_SIGN_SIGNED);
509 }
510 #else
511 #  define IsSignSigned(T)       (GetSignedness (T) == T_SIGN_SIGNED)
512 #endif
513
514 #if defined(HAVE_INLINE)
515 INLINE TypeCode GetQualifier (const Type* T)
516 /* Get the qualifier from the given type string */
517 {
518     return (T->C & T_MASK_QUAL);
519 }
520 #else
521 #  define GetQualifier(T)      ((T)->C & T_MASK_QUAL)
522 #endif
523
524 #if defined(HAVE_INLINE)
525 INLINE int IsQualConst (const Type* T)
526 /* Return true if the given type has a const memory image */
527 {
528     return (T->C & T_QUAL_CONST) != 0;
529 }
530 #else
531 #  define IsQualConst(T)        ((T->C & T_QUAL_CONST) != 0)
532 #endif
533
534 #if defined(HAVE_INLINE)
535 INLINE int IsQualVolatile (const Type* T)
536 /* Return true if the given type has a volatile type qualifier */
537 {
538     return (T->C & T_QUAL_VOLATILE) != 0;
539 }
540 #else
541 #  define IsQualVolatile(T)     (T->C & T_QUAL_VOLATILE) != 0)
542 #endif
543
544 #if defined(HAVE_INLINE)
545 INLINE int IsQualRestrict (const Type* T)
546 /* Return true if the given type has a restrict qualifier */
547 {
548     return (T->C & T_QUAL_RESTRICT) != 0;
549 }
550 #else
551 #  define IsQualRestrict(T)     (T->C & T_QUAL_RESTRICT) != 0)
552 #endif
553
554 #if defined(HAVE_INLINE)
555 INLINE int IsQualNear (const Type* T)
556 /* Return true if the given type has a near qualifier */
557 {
558     return (T->C & T_QUAL_NEAR) != 0;
559 }
560 #else
561 #  define IsQualNear(T)         (T->C & T_QUAL_NEAR) != 0)
562 #endif
563
564 #if defined(HAVE_INLINE)
565 INLINE int IsQualFar (const Type* T)
566 /* Return true if the given type has a far qualifier */
567 {
568     return (T->C & T_QUAL_FAR) != 0;
569 }
570 #else
571 #  define IsQualFar(T)          (T->C & T_QUAL_FAR) != 0)
572 #endif
573
574 #if defined(HAVE_INLINE)
575 INLINE int IsQualFastcall (const Type* T)
576 /* Return true if the given type has a fastcall qualifier */
577 {
578     return (T->C & T_QUAL_FASTCALL) != 0;
579 }
580 #else
581 #  define IsQualFastcall(T)     (T->C & T_QUAL_FASTCALL) != 0)
582 #endif
583
584 int IsVariadicFunc (const Type* T) attribute ((const));
585 /* Return true if this is a function type or pointer to function type with
586  * variable parameter list
587  */
588
589 #if defined(HAVE_INLINE)
590 INLINE TypeCode GetSizeModifier (const Type* T)
591 /* Get the size modifier of a type */
592 {
593     return (T->C & T_MASK_SIZE);
594 }
595 #else
596 #  define GetSizeModifier(T)      ((T)->C & T_MASK_SIZE)
597 #endif
598
599 FuncDesc* GetFuncDesc (const Type* T) attribute ((const));
600 /* Get the FuncDesc pointer from a function or pointer-to-function type */
601
602 void SetFuncDesc (Type* T, FuncDesc* F);
603 /* Set the FuncDesc pointer in a function or pointer-to-function type */
604
605 Type* GetFuncReturn (Type* T) attribute ((const));
606 /* Return a pointer to the return type of a function or pointer-to-function type */
607
608 long GetElementCount (const Type* T);
609 /* Get the element count of the array specified in T (which must be of
610  * array type).
611  */
612
613 void SetElementCount (Type* T, long Count);
614 /* Set the element count of the array specified in T (which must be of
615  * array type).
616  */
617
618 Type* GetElementType (Type* T);
619 /* Return the element type of the given array type. */
620
621 struct SymEntry* GetSymEntry (const Type* T) attribute ((const));
622 /* Return a SymEntry pointer from a type */
623
624 void SetSymEntry (Type* T, struct SymEntry* S);
625 /* Set the SymEntry pointer for a type */
626
627 Type* IntPromotion (Type* T);
628 /* Apply the integer promotions to T and return the result. The returned type
629  * string may be T if there is no need to change it.
630  */
631
632 Type* PtrConversion (Type* T);
633 /* If the type is a function, convert it to pointer to function. If the
634  * expression is an array, convert it to pointer to first element. Otherwise
635  * return T.
636  */
637
638 TypeCode AddrSizeQualifier (unsigned AddrSize);
639 /* Return T_QUAL_NEAR or T_QUAL_FAR depending on the address size */
640
641 #if defined(HAVE_INLINE)
642 INLINE TypeCode CodeAddrSizeQualifier (void)
643 /* Return T_QUAL_NEAR or T_QUAL_FAR depending on the code address size */
644 {
645     return AddrSizeQualifier (CodeAddrSize);
646 }
647 #else
648 #  define CodeAddrSizeQualifier()      (AddrSizeQualifier (CodeAddrSize))
649 #endif
650
651 #if defined(HAVE_INLINE)
652 INLINE TypeCode DataAddrSizeQualifier (void)
653 /* Return T_QUAL_NEAR or T_QUAL_FAR depending on the data address size */
654 {
655     return AddrSizeQualifier (DataAddrSize);
656 }
657 #else
658 #  define DataAddrSizeQualifier()      (AddrSizeQualifier (DataAddrSize))
659 #endif
660
661
662
663 /* End of datatype.h */
664
665 #endif
666
667
668