Commit 5124e66f authored by Russ Cox's avatar Russ Cox

c compiler bug tickled by

	void f(struct { int x[1]; } p) { }
the "int" was getting attached to f.

R=ken
OCL=35145
CL=35151
parent 5b79202c
...@@ -44,6 +44,8 @@ ...@@ -44,6 +44,8 @@
{ {
Type* t1; Type* t1;
Type* t2; Type* t2;
Type* t3;
uchar c;
} tyty; } tyty;
struct struct
{ {
...@@ -925,16 +927,22 @@ sbody: ...@@ -925,16 +927,22 @@ sbody:
{ {
$<tyty>$.t1 = strf; $<tyty>$.t1 = strf;
$<tyty>$.t2 = strl; $<tyty>$.t2 = strl;
$<tyty>$.t3 = lasttype;
$<tyty>$.c = lastclass;
strf = T; strf = T;
strl = T; strl = T;
lastbit = 0; lastbit = 0;
firstbit = 1; firstbit = 1;
lastclass = CXXX;
lasttype = T;
} }
edecl '}' edecl '}'
{ {
$$ = strf; $$ = strf;
strf = $<tyty>2.t1; strf = $<tyty>2.t1;
strl = $<tyty>2.t2; strl = $<tyty>2.t2;
lasttype = $<tyty>2.t3;
lastclass = $<tyty>2.c;
} }
zctlist: zctlist:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment