Path: utzoo!attcan!uunet!bu.edu!rpi!zaphod.mps.ohio-state.edu!usc!cs.utexas.edu!tut.cis.ohio-state.edu!uccba!mead!mead.UUCP From: nxh@mead.UUCP (Nobuya Higashiyama) Newsgroups: comp.lang.c++ Subject: Interesting problem: mixing inline and automatic variable Keywords: inline automatic variable problem Message-ID: <1053@meaddata.mead.UUCP> Date: 2 Aug 90 16:32:14 GMT Sender: usenet@mead.UUCP Reply-To: mead!nxh@uccba.uc.edu Organization: Mead Data Central, Dayton OH Lines: 48 We ran into an interesting problem with cfont 2.0. It seems that it doesn't like an allocation of automatic variable within an inline function. The following code illustrates the problem. #include class Foo { public: Foo (); void doit (); }; Foo::Foo () { } inline void Foo::doit () { char buf[1024]; sprintf (buf, "Hello, world\n"); cout << buf; } main () { Foo bar; bar.doit (); } The compiler comes back with the message: "test.c", line 27: sorry, not implemented: cannot expand inline function needing temporary variable of vector type This problem disappears when Foo:doit () is changed to a non-inline function. I'd like to know if this is a bug, a feature or a limitation with our current version of cfront (or if there's something wrong with my code). Thanks in advance! Higgy -- Nobuya "Higgy" Higashiyama | ____/| Data Integrity Systems | \ o.O| Vote for Bill in '92! Mead Data Central, Dayton, OH | =(_)= mead!nxh@uccba.uc.edu (or) ...!uccba!mead!nxh | U ACK! THPHTH!