[gnu.g++.bug] Bug with undefined types

rfrench@ATHENA.MIT.EDU ("Robert S. French") (02/20/89)

In g++ 1.32.0 on a BSD 4.3 VAX:

A file such as the following:

struct foo {
	bar *baz;
};

main(int argc, char *argv[])
{
    cout << "Hi!\n";
}

causes g++ to completely ignore the file after the reference to the
undeclared type "bar".  No error message is printed, and an object
file is generated (containing very little).  For example:

136% g++ -v /tmp/foo.cc
g++ version 1.32.0
 /mit/gnu/vaxlib/gcc-cpp -+ -v -undef -D__GNU__ -D__GNUG__ -Dvax -Dunix /tmp/foo
.cc /tmp/cc000244.cpp
GNU CPP version 1.33
 /mit/gnu/vaxlib/gcc-c++ /tmp/cc000244.cpp -quiet -dumpbase /tmp/foo.cc -noreg -
version -o /tmp/cc000244.s
GNU C++ version 1.32.0 (vax) compiled by GNU C version 1.32.
 /mit/gnu/vaxlib/gcc-as /tmp/cc000244.s -o foo.o
 /mit/gnu/vaxlib/gcc-ld++ -C /mit/gnu/vaxlib/gcc-crt0+.o foo.o -lg++ /mit/gnu/va
xlib/gcc-gnulib -lc
Undefined symbols:
 _main


If "bar" is declared before the structure definition, the file works
fine.

		Rob