ref: e6f7d19657b0acc6a6cbb87da073a18c44efe883
parent: c6ea791b9cac2e0e4486156b8751acd82da179dd
author: Roberto E. Vargas Caballero <[email protected]>
date: Sat Nov 15 01:30:28 EST 2014
Fix minus 1 error in declaration The queue pointer is always pointing to the last free position, so we have to decrement it always before of beginngin to create types. This error was not detected because it was not entering in any case of the switch.
--- a/cc1/decl.c
+++ b/cc1/decl.c
@@ -147,7 +147,7 @@
memset(data, 0, sizeof(data));
data[NR_DECLARATORS].op = 255;
- for (bp = declarator0(data); bp >= data; --bp) {
+ for (bp = declarator0(data)-1; bp >= data; --bp) {
switch (bp->op) {
case PTR:
tp = mktype(tp, PTR, NULL);