]> git.draconx.ca Git - cdecl99.git/commitdiff
Combine English specifiers properly.
authorNick Bowler <nbowler@draconx.ca>
Tue, 19 Jul 2011 23:10:00 +0000 (19:10 -0400)
committerNick Bowler <nbowler@draconx.ca>
Tue, 19 Jul 2011 23:13:10 +0000 (19:13 -0400)
If $1 is NULL in post_specs, then $3 won't get attached to the list.

src/parse.y

index 8764159215fa672829fe4e4ceacdb3a6f687a5ed..32ee5a7d1efdbd608413964a8302594321c9c418 100644 (file)
@@ -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;