{
type = check_typedef (type);
fprintf_filtered (stream, "typedef ");
- type_print (type, "", stream, 0);
+ type_print (type, "", stream, -1);
if (TYPE_NAME ((SYMBOL_TYPE (new_symbol))) == 0
|| strcmp (TYPE_NAME ((SYMBOL_TYPE (new_symbol))),
SYMBOL_LINKAGE_NAME (new_symbol)) != 0
typedef enum enum_t my_enum_t;
typedef my_enum_t nested_enum_t;
+typedef struct
+{
+ double d;
+ float f;
+} anon_struct_t;
+
+typedef anon_struct_t nested_anon_struct_t;
+
+typedef enum
+{
+ DD, EE, FF
+} anon_enum_t;
+
+typedef anon_enum_t nested_anon_enum_t;
+
+union union_t
+{
+ int i;
+ float f;
+};
+
+typedef union union_t nested_union_t;
+
+typedef union
+{
+ int i;
+ double d;
+} anon_union_t;
+
+typedef anon_union_t nested_anon_union_t;
+
volatile int var_a;
volatile float var_b;
volatile my_int_t var_c;
volatile enum enum_t var_m;
volatile my_enum_t var_n;
volatile nested_enum_t var_o;
+volatile anon_struct_t var_p;
+volatile nested_anon_struct_t var_q;
+volatile anon_enum_t var_r;
+volatile nested_anon_enum_t var_s;
+volatile union union_t var_t;
+volatile nested_union_t var_u;
+volatile anon_union_t var_v;
+volatile nested_anon_union_t var_w;
#ifdef __cplusplus
"All defined types:" \
"" \
"File .*:" \
- "59:\[\t \]+CL;" \
+ "98:\[\t \]+CL;" \
+ "42:\[\t \]+anon_struct_t;" \
+ "65:\[\t \]+anon_union_t;" \
"21:\[\t \]+baz_t;" \
"33:\[\t \]+enum_t;" \
+ "56:\[\t \]+union_t;" \
+ "52:\[\t \]+typedef enum {\\.\\.\\.} anon_enum_t;" \
+ "45:\[\t \]+typedef anon_struct_t anon_struct_t;" \
+ "68:\[\t \]+typedef anon_union_t anon_union_t;" \
"28:\[\t \]+typedef baz_t baz;" \
"31:\[\t \]+typedef baz_t \\* baz_ptr;" \
"27:\[\t \]+typedef baz_t baz_t;" \
"\[\t \]+double" \
"\[\t \]+float" \
"\[\t \]+int" \
- "64:\[\t \]+typedef CL my_cl;" \
+ "103:\[\t \]+typedef CL my_cl;" \
"38:\[\t \]+typedef enum_t my_enum_t;" \
"17:\[\t \]+typedef float my_float_t;" \
"16:\[\t \]+typedef int my_int_t;" \
- "65:\[\t \]+typedef CL \\* my_ptr;" \
+ "104:\[\t \]+typedef CL \\* my_ptr;" \
+ "54:\[\t \]+typedef enum {\\.\\.\\.} nested_anon_enum_t;" \
+ "47:\[\t \]+typedef anon_struct_t nested_anon_struct_t;" \
+ "70:\[\t \]+typedef anon_union_t nested_anon_union_t;" \
"30:\[\t \]+typedef baz_t nested_baz;" \
"29:\[\t \]+typedef baz_t nested_baz_t;" \
"39:\[\t \]+typedef enum_t nested_enum_t;" \
"19:\[\t \]+typedef float nested_float_t;" \
"18:\[\t \]+typedef int nested_int_t;" \
+ "62:\[\t \]+typedef union_t nested_union_t;" \
"\[\t \]+unsigned int"]
} else {
set output_re \
"All defined types:" \
"" \
"File .*:" \
+ "52:\[\t \]+typedef enum {\\.\\.\\.} anon_enum_t;" \
+ "45:\[\t \]+typedef struct {\\.\\.\\.} anon_struct_t;" \
+ "68:\[\t \]+typedef union {\\.\\.\\.} anon_union_t;" \
"28:\[\t \]+typedef struct baz_t baz;" \
"31:\[\t \]+typedef struct baz_t \\* baz_ptr;" \
"21:\[\t \]+struct baz_t;" \
"38:\[\t \]+typedef enum enum_t my_enum_t;" \
"17:\[\t \]+typedef float my_float_t;" \
"16:\[\t \]+typedef int my_int_t;" \
+ "54:\[\t \]+typedef enum {\\.\\.\\.} nested_anon_enum_t;" \
+ "47:\[\t \]+typedef struct {\\.\\.\\.} nested_anon_struct_t;" \
+ "70:\[\t \]+typedef union {\\.\\.\\.} nested_anon_union_t;" \
"30:\[\t \]+typedef struct baz_t nested_baz;" \
"29:\[\t \]+typedef struct baz_t nested_baz_t;" \
"39:\[\t \]+typedef enum enum_t nested_enum_t;" \
"19:\[\t \]+typedef float nested_float_t;" \
"18:\[\t \]+typedef int nested_int_t;" \
+ "62:\[\t \]+typedef union union_t nested_union_t;" \
+ "56:\[\t \]+union union_t;" \
"\[\t \]+unsigned int" ]
}