From: ceriel Date: Thu, 25 Jul 1991 16:00:32 +0000 (+0000) Subject: removed scan.c and fixed a bug: 'struct a;' is an empty decl if struct a is already... X-Git-Tag: release-5-5~1078 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=da84cc69bc0afe17a7c7289ef9f9fbd38bdca6a0;p=ack.git removed scan.c and fixed a bug: 'struct a;' is an empty decl if struct a is already known --- diff --git a/lang/cem/cemcom.ansi/.distr b/lang/cem/cemcom.ansi/.distr index b41f18da6..3581d2b45 100644 --- a/lang/cem/cemcom.ansi/.distr +++ b/lang/cem/cemcom.ansi/.distr @@ -85,7 +85,6 @@ proto.c proto.str replace.c replace.str -scan.c sizes.h skip.c specials.h diff --git a/lang/cem/cemcom.ansi/Makefile b/lang/cem/cemcom.ansi/Makefile index 476b3829f..030112766 100644 --- a/lang/cem/cemcom.ansi/Makefile +++ b/lang/cem/cemcom.ansi/Makefile @@ -120,7 +120,7 @@ GHSRC = botch_free.h dataflow.h debug.h density.h errout.h \ nobitfield.h nopp.h nocross.h \ nparams.h numsize.h parbufsize.h pathlength.h Lpars.h \ strsize.h trgt_sizes.h textsize.h use_tmp.h spec_arith.h static.h \ - regcount.h + regcount.h db_symtab.h HSRC = LLlex.h align.h arith.h assert.h atw.h class.h \ input.h interface.h label.h level.h mes.h sizes.h specials.h \ diff --git a/lang/cem/cemcom.ansi/declar.g b/lang/cem/cemcom.ansi/declar.g index 61065fb71..7a5e8ffe2 100644 --- a/lang/cem/cemcom.ansi/declar.g +++ b/lang/cem/cemcom.ansi/declar.g @@ -463,7 +463,11 @@ struct_or_union_specifier(register struct type **tpp;) * this means that we have to declare a new * structure. (yegh) */ - if (DOT == ';') declare_struct(fund, idf, tpp); + if (DOT == ';' && + ( !idf->id_tag || + idf->id_tag->tg_level != level || + idf->id_tag->tg_type->tp_size < 0 + )) declare_struct(fund, idf, tpp); else apply_struct(fund, idf, tpp); } /* empty */