if (type1 == intQI_type_node || type1 == unsigned_intQI_type_node)
return unsignedp ? unsigned_intQI_type_node : intQI_type_node;
-#define C_COMMON_FIXED_TYPES(SAT,NAME) \
- if (type1 == SAT ## short_ ## NAME ## _type_node \
- || type1 == SAT ## unsigned_short_ ## NAME ## _type_node) \
- return unsignedp ? SAT ## unsigned_short_ ## NAME ## _type_node \
- : SAT ## short_ ## NAME ## _type_node; \
- if (type1 == SAT ## NAME ## _type_node \
- || type1 == SAT ## unsigned_ ## NAME ## _type_node) \
- return unsignedp ? SAT ## unsigned_ ## NAME ## _type_node \
- : SAT ## NAME ## _type_node; \
- if (type1 == SAT ## long_ ## NAME ## _type_node \
- || type1 == SAT ## unsigned_long_ ## NAME ## _type_node) \
- return unsignedp ? SAT ## unsigned_long_ ## NAME ## _type_node \
- : SAT ## long_ ## NAME ## _type_node; \
- if (type1 == SAT ## long_long_ ## NAME ## _type_node \
- || type1 == SAT ## unsigned_long_long_ ## NAME ## _type_node) \
- return unsignedp ? SAT ## unsigned_long_long_ ## NAME ## _type_node \
- : SAT ## long_long_ ## NAME ## _type_node;
-
-#define C_COMMON_FIXED_MODE_TYPES(SAT,NAME) \
- if (type1 == SAT ## NAME ## _type_node \
- || type1 == SAT ## u ## NAME ## _type_node) \
- return unsignedp ? SAT ## u ## NAME ## _type_node \
- : SAT ## NAME ## _type_node;
-
- C_COMMON_FIXED_TYPES (, fract);
- C_COMMON_FIXED_TYPES (sat_, fract);
- C_COMMON_FIXED_TYPES (, accum);
- C_COMMON_FIXED_TYPES (sat_, accum);
-
- C_COMMON_FIXED_MODE_TYPES (, qq);
- C_COMMON_FIXED_MODE_TYPES (, hq);
- C_COMMON_FIXED_MODE_TYPES (, sq);
- C_COMMON_FIXED_MODE_TYPES (, dq);
- C_COMMON_FIXED_MODE_TYPES (, tq);
- C_COMMON_FIXED_MODE_TYPES (sat_, qq);
- C_COMMON_FIXED_MODE_TYPES (sat_, hq);
- C_COMMON_FIXED_MODE_TYPES (sat_, sq);
- C_COMMON_FIXED_MODE_TYPES (sat_, dq);
- C_COMMON_FIXED_MODE_TYPES (sat_, tq);
- C_COMMON_FIXED_MODE_TYPES (, ha);
- C_COMMON_FIXED_MODE_TYPES (, sa);
- C_COMMON_FIXED_MODE_TYPES (, da);
- C_COMMON_FIXED_MODE_TYPES (, ta);
- C_COMMON_FIXED_MODE_TYPES (sat_, ha);
- C_COMMON_FIXED_MODE_TYPES (sat_, sa);
- C_COMMON_FIXED_MODE_TYPES (sat_, da);
- C_COMMON_FIXED_MODE_TYPES (sat_, ta);
+#define C_COMMON_FIXED_TYPES(NAME) \
+ if (type1 == short_ ## NAME ## _type_node \
+ || type1 == unsigned_short_ ## NAME ## _type_node) \
+ return unsignedp ? unsigned_short_ ## NAME ## _type_node \
+ : short_ ## NAME ## _type_node; \
+ if (type1 == NAME ## _type_node \
+ || type1 == unsigned_ ## NAME ## _type_node) \
+ return unsignedp ? unsigned_ ## NAME ## _type_node \
+ : NAME ## _type_node; \
+ if (type1 == long_ ## NAME ## _type_node \
+ || type1 == unsigned_long_ ## NAME ## _type_node) \
+ return unsignedp ? unsigned_long_ ## NAME ## _type_node \
+ : long_ ## NAME ## _type_node; \
+ if (type1 == long_long_ ## NAME ## _type_node \
+ || type1 == unsigned_long_long_ ## NAME ## _type_node) \
+ return unsignedp ? unsigned_long_long_ ## NAME ## _type_node \
+ : long_long_ ## NAME ## _type_node;
+
+#define C_COMMON_FIXED_MODE_TYPES(NAME) \
+ if (type1 == NAME ## _type_node \
+ || type1 == u ## NAME ## _type_node) \
+ return unsignedp ? u ## NAME ## _type_node \
+ : NAME ## _type_node;
+
+#define C_COMMON_FIXED_TYPES_SAT(NAME) \
+ if (type1 == sat_ ## short_ ## NAME ## _type_node \
+ || type1 == sat_ ## unsigned_short_ ## NAME ## _type_node) \
+ return unsignedp ? sat_ ## unsigned_short_ ## NAME ## _type_node \
+ : sat_ ## short_ ## NAME ## _type_node; \
+ if (type1 == sat_ ## NAME ## _type_node \
+ || type1 == sat_ ## unsigned_ ## NAME ## _type_node) \
+ return unsignedp ? sat_ ## unsigned_ ## NAME ## _type_node \
+ : sat_ ## NAME ## _type_node; \
+ if (type1 == sat_ ## long_ ## NAME ## _type_node \
+ || type1 == sat_ ## unsigned_long_ ## NAME ## _type_node) \
+ return unsignedp ? sat_ ## unsigned_long_ ## NAME ## _type_node \
+ : sat_ ## long_ ## NAME ## _type_node; \
+ if (type1 == sat_ ## long_long_ ## NAME ## _type_node \
+ || type1 == sat_ ## unsigned_long_long_ ## NAME ## _type_node) \
+ return unsignedp ? sat_ ## unsigned_long_long_ ## NAME ## _type_node \
+ : sat_ ## long_long_ ## NAME ## _type_node;
+
+#define C_COMMON_FIXED_MODE_TYPES_SAT(NAME) \
+ if (type1 == sat_ ## NAME ## _type_node \
+ || type1 == sat_ ## u ## NAME ## _type_node) \
+ return unsignedp ? sat_ ## u ## NAME ## _type_node \
+ : sat_ ## NAME ## _type_node;
+
+ C_COMMON_FIXED_TYPES (fract);
+ C_COMMON_FIXED_TYPES_SAT (fract);
+ C_COMMON_FIXED_TYPES (accum);
+ C_COMMON_FIXED_TYPES_SAT (accum);
+
+ C_COMMON_FIXED_MODE_TYPES (qq);
+ C_COMMON_FIXED_MODE_TYPES (hq);
+ C_COMMON_FIXED_MODE_TYPES (sq);
+ C_COMMON_FIXED_MODE_TYPES (dq);
+ C_COMMON_FIXED_MODE_TYPES (tq);
+ C_COMMON_FIXED_MODE_TYPES_SAT (qq);
+ C_COMMON_FIXED_MODE_TYPES_SAT (hq);
+ C_COMMON_FIXED_MODE_TYPES_SAT (sq);
+ C_COMMON_FIXED_MODE_TYPES_SAT (dq);
+ C_COMMON_FIXED_MODE_TYPES_SAT (tq);
+ C_COMMON_FIXED_MODE_TYPES (ha);
+ C_COMMON_FIXED_MODE_TYPES (sa);
+ C_COMMON_FIXED_MODE_TYPES (da);
+ C_COMMON_FIXED_MODE_TYPES (ta);
+ C_COMMON_FIXED_MODE_TYPES_SAT (ha);
+ C_COMMON_FIXED_MODE_TYPES_SAT (sa);
+ C_COMMON_FIXED_MODE_TYPES_SAT (da);
+ C_COMMON_FIXED_MODE_TYPES_SAT (ta);
/* For ENUMERAL_TYPEs in C++, must check the mode of the types, not
the precision; they have precision set to match their range, but
complex_long_double_type_node = build_complex_type (long_double_type_node);
/* Make fixed-point nodes based on sat/non-sat and signed/unsigned. */
-#define MAKE_FIXED_TYPE_NODE(KIND,WIDTH,SIZE) \
+#define MAKE_FIXED_TYPE_NODE(KIND,SIZE) \
+ sat_ ## KIND ## _type_node = \
+ make_sat_signed_ ## KIND ## _type (SIZE); \
+ sat_unsigned_ ## KIND ## _type_node = \
+ make_sat_unsigned_ ## KIND ## _type (SIZE); \
+ KIND ## _type_node = make_signed_ ## KIND ## _type (SIZE); \
+ unsigned_ ## KIND ## _type_node = \
+ make_unsigned_ ## KIND ## _type (SIZE);
+
+#define MAKE_FIXED_TYPE_NODE_WIDTH(KIND,WIDTH,SIZE) \
sat_ ## WIDTH ## KIND ## _type_node = \
make_sat_signed_ ## KIND ## _type (SIZE); \
sat_unsigned_ ## WIDTH ## KIND ## _type_node = \
/* Make fixed-point type nodes based on four different widths. */
#define MAKE_FIXED_TYPE_NODE_FAMILY(N1,N2) \
- MAKE_FIXED_TYPE_NODE (N1, short_, SHORT_ ## N2 ## _TYPE_SIZE) \
- MAKE_FIXED_TYPE_NODE (N1, , N2 ## _TYPE_SIZE) \
- MAKE_FIXED_TYPE_NODE (N1, long_, LONG_ ## N2 ## _TYPE_SIZE) \
- MAKE_FIXED_TYPE_NODE (N1, long_long_, LONG_LONG_ ## N2 ## _TYPE_SIZE)
+ MAKE_FIXED_TYPE_NODE_WIDTH (N1, short_, SHORT_ ## N2 ## _TYPE_SIZE) \
+ MAKE_FIXED_TYPE_NODE (N1, N2 ## _TYPE_SIZE) \
+ MAKE_FIXED_TYPE_NODE_WIDTH (N1, long_, LONG_ ## N2 ## _TYPE_SIZE) \
+ MAKE_FIXED_TYPE_NODE_WIDTH (N1, long_long_, LONG_LONG_ ## N2 ## _TYPE_SIZE)
/* Make fixed-point mode nodes based on sat/non-sat and signed/unsigned. */
#define MAKE_FIXED_MODE_NODE(KIND,NAME,MODE) \
VEC(T,B) base; \
} VEC(T,A)
+#define VEC_TA(T,B,A) \
+typedef struct VEC(T,A) \
+{ \
+ VEC(T,B) base; \
+} VEC(T,A)
+
/* Convert to base type. */
#define VEC_BASE(P) ((P) ? &(P)->base : 0)
} \
\
VEC_T(T,base); \
-VEC_TA_GTY(T,base,none,); \
+VEC_TA(T,base,none); \
DEF_VEC_FUNC_P(T) \
struct vec_swallow_trailing_semi
#define DEF_VEC_ALLOC_I(T,A) \
-VEC_TA_GTY(T,base,A,); \
+VEC_TA(T,base,A); \
DEF_VEC_ALLOC_FUNC_I(T,A) \
struct vec_swallow_trailing_semi
} \
\
VEC_T_GTY(T,base); \
-VEC_TA_GTY(T,base,none,); \
+VEC_TA(T,base,none); \
DEF_VEC_FUNC_P(T) \
struct vec_swallow_trailing_semi
#define DEF_VEC_ALLOC_P(T,A) \
-VEC_TA_GTY(T,base,A,); \
+VEC_TA(T,base,A); \
DEF_VEC_ALLOC_FUNC_P(T,A) \
struct vec_swallow_trailing_semi
/* Vector of object. */
#define DEF_VEC_O(T) \
VEC_T_GTY(T,base); \
-VEC_TA_GTY(T,base,none,); \
+VEC_TA(T,base,none); \
DEF_VEC_FUNC_O(T) \
struct vec_swallow_trailing_semi
#define DEF_VEC_ALLOC_O(T,A) \
-VEC_TA_GTY(T,base,A,); \
+VEC_TA(T,base,A); \
DEF_VEC_ALLOC_FUNC_O(T,A) \
struct vec_swallow_trailing_semi