X-Git-Url: https://git.draconx.ca/gitweb/cdecl99.git/blobdiff_plain/4ef59e97312cf3e8f537643c65bc2fef057b786b..dd59ec37f1b1594b41e0ad728c7af7e3fe54c562:/t/gen-typegen.awk diff --git a/t/gen-typegen.awk b/t/gen-typegen.awk index ee94b0e..0fb1a49 100755 --- a/t/gen-typegen.awk +++ b/t/gen-typegen.awk @@ -34,10 +34,12 @@ $0 ~ /^[abcdefghijklmnopqrstuvwxyz_]/ { } END { - print "static inline struct cdecl_declspec *" - print "gen_raw_typespec_(unsigned type, struct cdecl_declspec *next)\n{" - print "\tstruct cdecl_declspec *s = malloc_nofail(sizeof *s);" - print "\t*s = (struct cdecl_declspec) { .next = next, .type = type };" + print "static inline struct cdecl_declspec *"; + print "gen_raw_typespec_(unsigned type, struct cdecl_declspec *next)\n{"; + print "\tstruct cdecl_declspec *s = malloc_nofail(sizeof *s);"; + print "\ts->type = type;"; + print "\ts->next = next;"; + print "\ts->ident = 0;"; print "\treturn s;\n}\n" print "static inline struct cdecl_declspec *"