nxh@mead.UUCP (Nobuya Higashiyama) (08/02/90)
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 <stream.h>
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!