Date: Fri, 9 May 1997 17:46:24 -0700 (MST) From: Terry Lambert <terry@lambert.org> To: hasty@rah.star-gate.com (Amancio Hasty) Cc: moore@WOLFENET.com, freebsd-hackers@FreeBSD.ORG Subject: Re: g++ shared library segfaults Message-ID: <199705100046.RAA01368@phaeton.artisoft.com> In-Reply-To: <199705092336.QAA06620@rah.star-gate.com> from "Amancio Hasty" at May 9, 97 04:36:47 pm
index | next in thread | previous in thread | raw e-mail
> > 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.
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199705100046.RAA01368>
