gcc/:
* godump.c (go_output_typedef): When outputting a typedef, refer
to the underlying type by its name and not its structure.
gcc/testsuite:
* gcc.misc-tests/godump-1.c: Add test case for typedef before
struct.
From-SVN: r267958
+2019-01-15 Nikhil Benesch <nikhil.benesch@gmail.com>
+
+ * godump.c (go_output_typedef): When outputting a typedef, refer
+ to the underlying type by its name and not its structure.
+
2019-01-15 David Malcolm <dmalcolm@redhat.com>
PR c++/88795
return;
*slot = CONST_CAST (void *, (const void *) type);
- if (!go_format_type (container, TREE_TYPE (decl), false, false, NULL,
+ if (!go_format_type (container, TREE_TYPE (decl), true, false, NULL,
false))
{
fprintf (go_dump_file, "// ");
+2019-01-15 Nikhil Benesch <nikhil.benesch@gmail.com>
+
+ * gcc.misc-tests/godump-1.c: Add test case for typedef before
+ struct.
+
2019-01-15 David Malcolm <dmalcolm@redhat.com>
PR c++/88795
typedef struct s_undef_t s_undef_t2;
+typedef struct s_fwd *s_fwd_p;
+/* { dg-final { scan-file godump-1.out "(?n)^type _s_fwd_p \\*_s_fwd$" } } */
+
+struct s_fwd { };
+/* { dg-final { scan-file godump-1.out "(?n)^type _s_fwd struct \{ \}$" } } */
/*** nested structs ***/
typedef struct { struct { uint8_t ca[3]; } s; uint32_t i; } tsn;