From: Nick Bowler Date: Tue, 19 Jul 2011 23:10:00 +0000 (-0400) Subject: Combine English specifiers properly. X-Git-Tag: v1~127 X-Git-Url: https://git.draconx.ca/gitweb/cdecl99.git/commitdiff_plain/fd33450dba11c286f1af770098ccdf6b2208433e Combine English specifiers properly. If $1 is NULL in post_specs, then $3 won't get attached to the list. --- diff --git a/src/parse.y b/src/parse.y index 8764159..32ee5a7 100644 --- a/src/parse.y +++ b/src/parse.y @@ -449,7 +449,7 @@ type_qual_specs: { $$ = NULL; } | type_qual_spec type_qual_specs { post_specs: qualifiers typespec type_qual_specs { $$ = $2; $$->next = $1; - for (struct cdecl_declspec *s = $1; s; s = s->next) { + for (struct cdecl_declspec *s = $$; s; s = s->next) { if (!s->next) { s->next = $3; break;