ken@CS.ROCHESTER.EDU (Ken Yap) (07/10/89)
[Sorry if this is a fixed problem, our local maintainer is rather busy.] Problem: Accidental use of a field name causes g++ to forget structure member later. Program: class foo { public: int rhslen; }; xxx() { foo *f; zzz(rhslen); } yyy() { foo *f; zzz(f->rhslen); } Diagnostics: g++ version 1.34.2 /usr/su/lib/gcc-cpp -+ -v -undef -D__GNU__ -D__GNUG__ -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -D__HAVE_68881__ -Dmc68020 bug4.cc /tmp/cca00401.cpp GNU CPP version 1.35 /usr/su/lib/gcc-c++ /tmp/cca00401.cpp -quiet -dumpbase bug4.cc -noreg -version -o /tmp/cca00401.s GNU C++ version 1.34.2 (68k, MIT syntax) compiled by GNU C version 1.34. In function int xxx (): bug4.cc:11: `rhslen' was not declared (first use this function) bug4.cc:11: (Each undeclared identifier is reported only once bug4.cc:11: for each function it appears in.) In function int yyy (): bug4.cc:18: structure has no member named `rhslen'