Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!rutgers!princeton!udel!rochester!cornell!batcomputer!cpf From: cpf@batcomputer.tn.cornell.edu (Courtenay Footman) Newsgroups: comp.lang.c++ Subject: Member function bug I Message-ID: <2707@batcomputer.tn.cornell.edu> Date: Thu, 22-Oct-87 18:27:25 EST Article-I.D.: batcompu.2707 Posted: Thu Oct 22 18:27:25 1987 Date-Received: Sun, 25-Oct-87 15:18:44 EST Reply-To: cpf@tcgould.tn.cornell.edu (Courtenay Footman) Organization: LNS, Cornell University, Ithaca NY Lines: 29 The following program fragment causes c++ to blow up with an internal error. (C++ version 1.2.1, running on a Sun 3/50 under Unix 3.4.) ------------------------------------------------------------------------------- struct s_s { short s; }; struct x_s { s_s type[2]; int s(int i) { return type[i].s; } }; void g(x_s *x) { int *thing = & x[1].s(1); // Ooops } // Line 14 ------------------------------------------------------------------------------- The error is always at the end of the function where the bug lives, not the line number of the bug. CC -c bug2.c gives: CC bug2.c: "bug2.c", line 14: internal <> error: bus error (or something nasty like that) 1 error -- -------------------------------------------------------------------------------- Courtenay Footman ARPA: cpf@lnssun9.tn.cornell.edu Lab. of Nuclear Studies Usenet: Sometimes works Cornell University Bitnet: cpf@CRNLNUC.BITNET