Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ucbvax!decvax!allegra!deb From: deb@allegra.UUCP Newsgroups: comp.lang.c++ Subject: C++ BUG (confusing error message) Message-ID: <6490@allegra.UUCP> Date: Mon, 23-Feb-87 17:27:49 EST Article-I.D.: allegra.6490 Posted: Mon Feb 23 17:27:49 1987 Date-Received: Thu, 26-Feb-87 21:23:26 EST Reply-To: deb@allegra.UUCP (David Baraff) Organization: AT&T Bell Laboratories, Murray Hill Lines: 47 Keywords: inline, void /* file -- bug.c */ struct foo { void doit(); void start(); int next() { return 13; } int cond() { return 37;} }; void foo::start() {} void foo::doit() { for(start(); cond(); next()) ; } ======================================= $ CC -c bug.c CC +L bug.c: "bug.c", line 15: sorry, not implemented: call of inline void function in for expression 1 error $ ======================================= Problem: start() is NOT inline. Poor user (ME!!) went nuts looking for the inline function C++ was complaining about! Note: as long as start() is void (inline or no) this error message results. If start() wasn't void, as next() is not, then there is no problem, inline or not. Summary: Quick fix -- make those void functions return an int a la next() above. Annoying since it messes up the sense of the program since this function returns a value that is ignored. ------------------ Has anyone found this one? In switch statements, constructs which require con/de-structors must be in a block. If they are not, you get warned, right? Not always -- I had a sufficiently complicated case that C++ did NOT warn me! As a result the C code destructed something that was never constructed -- bad news. Unfortunately, I have not saved the code. David Baraff AT&T Bell Laboratories