When I compile the source file given below with gcc40 I get strange warnings. I use the snapshot 20050220, but with older snapshots i get the same results. The function is correct but the line number is wrong. By the way: Why is "." replaced by "$" ?
g++40 -v Using built-in specs. Target: x86_64-unknown-linux-gnu Configured with: ../gcc40/configure --prefix=/usr/local/gcc40e --program- suffix=40e --with-arch=opteron --enable-languages=c,c++ --enable-checking Thread model: posix gcc version 4.0.0 20050220 (experimental) gcc40 -c -Wall -O2 -o MeOut.o MeOut.ii MeOut.cpp: In member function 'void Cla::Bar2()': MeOut.cpp:36: warning: 'p$cp$dx' is used uninitialized in this function MeOut.cpp:36: warning: 'p$cp$oy' is used uninitialized in this function MeOut.cpp:36: warning: 'p$cp$ox' is used uninitialized in this function MeOut.cpp: In member function 'void Cla::Bar1()': MeOut.cpp:36: warning: 'p$cp$dy' is used uninitialized in this function MeOut.cpp:36: warning: 'p$cp$oy' is used uninitialized in this function MeOut.cpp:36: warning: 'p$cp$ox' is used uninitialized in this function ======================= #include <tao/ORB.h> namespace ME { struct crop { int ox; int oy; int dx; int dy; }; struct Parm { TAO_String_Manager filename; ME::crop cp; }; } // module ME class Cla { public: void Bar1(); void Bar2(); }; void Foo(ME::Parm x); void Cla::Bar1() { ME::Parm p; p.cp.dx = 0; Foo(p); } void Cla::Bar2() { ME::Parm p; p.cp.dy = 0; Foo(p); } -- Summary: Wrong line number in diagnostic with gcc 4.0 Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: micis at gmx dot de CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: x86_64-unknown-linux-gnu GCC host triplet: x86_64-unknown-linux-gnu GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20164