From owner-freebsd-hackers Fri May 9 17:51:41 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id RAA08956 for hackers-outgoing; Fri, 9 May 1997 17:51:41 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.50]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id RAA08950 for ; Fri, 9 May 1997 17:51:38 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id RAA01368; Fri, 9 May 1997 17:46:24 -0700 From: Terry Lambert Message-Id: <199705100046.RAA01368@phaeton.artisoft.com> Subject: Re: g++ shared library segfaults To: hasty@rah.star-gate.com (Amancio Hasty) Date: Fri, 9 May 1997 17:46:24 -0700 (MST) Cc: moore@WOLFENET.com, freebsd-hackers@FreeBSD.ORG In-Reply-To: <199705092336.QAA06620@rah.star-gate.com> from "Amancio Hasty" at May 9, 97 04:36:47 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > for (long i = 0; i < count; ++i) { > > ViewerColorInfo& info = _color_info->item_ref(i); > > if (strcmp(info._name, name) == 0) { > > break; > > } > > } > > > > later on it checks the value of i. I change the scope of i and doc just > > fired right up. Will "fix" similar referencs in doc. > > > > Uh, that's not an illegal reference. The scope of i extends to the > > end of the containing block, not the end of the "for" statement. For what it's worth, MSCVC++ and Borland C++ and Oregon C++ all have this same "compiler bug". Are you *sure* about the determination of scope? Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.