From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27638 invoked by alias); 23 Feb 2005 14:22:31 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 27586 invoked by uid 48); 23 Feb 2005 14:22:27 -0000 Date: Wed, 23 Feb 2005 18:15:00 -0000 From: "micis at gmx dot de" To: gcc-bugs@gcc.gnu.org Message-ID: <20050223142226.20164.micis@gmx.de> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/20164] New: Wrong line number in diagnostic with gcc 4.0 X-Bugzilla-Reason: CC X-SW-Source: 2005-02/txt/msg02807.txt.bz2 List-Id: 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 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