From 2a6c8390fa83bb098516deec52037dfb95233c43 Mon Sep 17 00:00:00 2001 From: ceriel Date: Mon, 5 Aug 1991 13:23:45 +0000 Subject: [PATCH] Fix for symbolic debugger --- lang/cem/cemcom.ansi/Makefile | 2 +- lang/cem/cemcom.ansi/statement.g | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lang/cem/cemcom.ansi/Makefile b/lang/cem/cemcom.ansi/Makefile index 030112766..694b54d09 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 db_symtab.h + regcount.h dbsymtab.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/statement.g b/lang/cem/cemcom.ansi/statement.g index 08c1cda21..23c396c46 100644 --- a/lang/cem/cemcom.ansi/statement.g +++ b/lang/cem/cemcom.ansi/statement.g @@ -467,7 +467,7 @@ compound_statement { #ifdef DBSYMTAB static int brc_level = 1; - int ndecl = 0; + int decl_seen = brc_level == 1; #endif /* DBSYMTAB */ } : @@ -481,14 +481,14 @@ compound_statement declaration { #ifdef DBSYMTAB - ndecl++; + decl_seen++; #endif /* DBSYMTAB */ } ]* { #ifdef DBSYMTAB ++brc_level; - if (options['g'] && ndecl) { + if (options['g'] && decl_seen) { C_ms_std((char *) 0, N_LBRAC, brc_level); } #endif /* DBSYMTAB */ @@ -500,7 +500,7 @@ compound_statement { unstack_level(); #ifdef DBSYMTAB - if (options['g'] && ndecl) { + if (options['g'] && decl_seen) { C_ms_std((char *) 0, N_RBRAC, brc_level); } brc_level--; -- 2.34.1