Thread View: gnu.g++.bug
1 messages
1 total messages
Started by "Robert S. French"
Mon, 20 Feb 1989 05:56
Bug with undefined types
Author: "Robert S. French"
Date: Mon, 20 Feb 1989 05:56
Date: Mon, 20 Feb 1989 05:56
37 lines
1379 bytes
1379 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads